diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2019-03-08 13:24:31 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-01-23 16:41:36 +0000 |
commit | 67aab02272f6cb47c56420f60b370c184961b5ca (patch) | |
tree | ccb644cfe90042750bc159c02d35874a48b3c128 /tools/virtiofsd/helper.c | |
parent | 7387863d033e8028aa09a815736617a7c4490827 (diff) |
virtiofsd: remove mountpoint dummy argument
Classic FUSE file system daemons take a mountpoint argument but
virtiofsd exposes a vhost-user UNIX domain socket instead. The
mountpoint argument is not used by virtiofsd but the user is still
required to pass a dummy argument on the command-line.
Remove the mountpoint argument to clean up the command-line.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/helper.c')
-rw-r--r-- | tools/virtiofsd/helper.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c index 5711dd2660..5e6f2051a7 100644 --- a/tools/virtiofsd/helper.c +++ b/tools/virtiofsd/helper.c @@ -140,27 +140,13 @@ void fuse_cmdline_help(void) static int fuse_helper_opt_proc(void *data, const char *arg, int key, struct fuse_args *outargs) { + (void)data; (void)outargs; - struct fuse_cmdline_opts *opts = data; switch (key) { case FUSE_OPT_KEY_NONOPT: - if (!opts->mountpoint) { - if (fuse_mnt_parse_fuse_fd(arg) != -1) { - return fuse_opt_add_opt(&opts->mountpoint, arg); - } - - char mountpoint[PATH_MAX] = ""; - if (realpath(arg, mountpoint) == NULL) { - fuse_log(FUSE_LOG_ERR, "fuse: bad mount point `%s': %s\n", arg, - strerror(errno)); - return -1; - } - return fuse_opt_add_opt(&opts->mountpoint, mountpoint); - } else { - fuse_log(FUSE_LOG_ERR, "fuse: invalid argument `%s'\n", arg); - return -1; - } + fuse_log(FUSE_LOG_ERR, "fuse: invalid argument `%s'\n", arg); + return -1; default: /* Pass through unknown options */ |