aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/9p-local.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/9pfs/9p-local.c')
-rw-r--r--hw/9pfs/9p-local.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 5c7f4cd9c7..4708c0bd89 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -1483,6 +1483,7 @@ static int local_parse_opts(QemuOpts *opts, FsDriverEntry *fse, Error **errp)
{
const char *sec_model = qemu_opt_get(opts, "security_model");
const char *path = qemu_opt_get(opts, "path");
+ const char *multidevs = qemu_opt_get(opts, "multidevs");
Error *local_err = NULL;
if (!sec_model) {
@@ -1506,6 +1507,26 @@ static int local_parse_opts(QemuOpts *opts, FsDriverEntry *fse, Error **errp)
return -1;
}
+ if (multidevs) {
+ if (!strcmp(multidevs, "remap")) {
+ fse->export_flags &= ~V9FS_FORBID_MULTIDEVS;
+ fse->export_flags |= V9FS_REMAP_INODES;
+ } else if (!strcmp(multidevs, "forbid")) {
+ fse->export_flags &= ~V9FS_REMAP_INODES;
+ fse->export_flags |= V9FS_FORBID_MULTIDEVS;
+ } else if (!strcmp(multidevs, "warn")) {
+ fse->export_flags &= ~V9FS_FORBID_MULTIDEVS;
+ fse->export_flags &= ~V9FS_REMAP_INODES;
+ } else {
+ error_setg(&local_err, "invalid multidevs property '%s'",
+ multidevs);
+ error_append_hint(&local_err, "Valid options are: multidevs="
+ "[remap|forbid|warn]\n");
+ error_propagate(errp, local_err);
+ return -1;
+ }
+ }
+
if (!path) {
error_setg(errp, "path property not set");
return -1;