]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/vfscore: Fix write const path in automount
authorAndrei Tatar <andrei@unikraft.io>
Tue, 29 Apr 2025 13:54:03 +0000 (15:54 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Tue, 29 Apr 2025 14:15:52 +0000 (14:15 +0000)
commitfaaecca04a509dfc6bd0a0c3f7866f7f0162f1a8
tree8943f90a2acff75c1c91d9f54cea741f8e394bc3
parenteabefb0794645a6ae73c1e1601c20dcf68b53610
lib/vfscore: Fix write const path in automount

Previously vfscore_mount_volume would pass a const path to
vfscore_ukopt_mkmp, which expects a mutable path, and indeed does modify
it in-place during execution. This is wrong and rightfully triggers a
compiler warning.
This change fixes this by having mkmp allocate a temporary writable path.

Checkpatch-Ignore: STRCPY
Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Michalis Pappas <michalis@unikraft.io>
GitHub-Closes: #1636
lib/vfscore/automount.c