virtiofsd: Stop using deprecated -f option

The rust implementation of virtiofsd always runs foreground and
spits a deprecation warning when `-f` is passed.

Signed-off-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
Greg Kurz 2023-06-13 18:14:38 +02:00
parent 11692a76e1
commit 2a15ad9788
2 changed files with 2 additions and 4 deletions

View File

@ -194,8 +194,6 @@ func (v *virtiofsd) args(FdSocketNumber uint) ([]string, error) {
"-o", "source=" + v.sourcePath,
// fd number of vhost-user socket
fmt.Sprintf("--fd=%v", FdSocketNumber),
// foreground operation
"-f",
}
if len(v.extraArgs) != 0 {

View File

@ -79,12 +79,12 @@ func TestVirtiofsdArgs(t *testing.T) {
cache: "none",
}
expected := "--syslog -o cache=none -o no_posix_lock -o source=/run/kata-shared/foo --fd=123 -f"
expected := "--syslog -o cache=none -o no_posix_lock -o source=/run/kata-shared/foo --fd=123"
args, err := v.args(123)
assert.NoError(err)
assert.Equal(expected, strings.Join(args, " "))
expected = "--syslog -o cache=none -o no_posix_lock -o source=/run/kata-shared/foo --fd=456 -f"
expected = "--syslog -o cache=none -o no_posix_lock -o source=/run/kata-shared/foo --fd=456"
args, err = v.args(456)
assert.NoError(err)
assert.Equal(expected, strings.Join(args, " "))