From: Greg Kurz Date: Tue, 10 Mar 2020 15:12:49 +0000 (+0100) Subject: 9p/proxy: Fix export_flags X-Git-Tag: v4.2.1~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=410252fc5b2aaef65b793edd37289284c1a4eb91;p=thirdparty%2Fqemu.git 9p/proxy: Fix export_flags The common fsdev options are set by qemu_fsdev_add() before it calls the backend specific option parsing code. In the case of "proxy" this means "writeout" or "readonly" were simply ignored. This has been broken from the beginning. Reported-by: Stéphane Graber Signed-off-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Christian Schoenebeck Message-Id: <158349633705.1237488.8895481990204796135.stgit@bahia.lan> (cherry picked from commit 659f1953281bcfa5ac217e42877d7d3c32eeea38) Signed-off-by: Michael Roth --- diff --git a/hw/9pfs/9p-proxy.c b/hw/9pfs/9p-proxy.c index 97ab9c58a57..3b885b96b58 100644 --- a/hw/9pfs/9p-proxy.c +++ b/hw/9pfs/9p-proxy.c @@ -1139,10 +1139,10 @@ static int proxy_parse_opts(QemuOpts *opts, FsDriverEntry *fs, Error **errp) } if (socket) { fs->path = g_strdup(socket); - fs->export_flags = V9FS_PROXY_SOCK_NAME; + fs->export_flags |= V9FS_PROXY_SOCK_NAME; } else { fs->path = g_strdup(sock_fd); - fs->export_flags = V9FS_PROXY_SOCK_FD; + fs->export_flags |= V9FS_PROXY_SOCK_FD; } return 0; }