Received: from eggs.gnu.org ([2001:4830:134:3::10]:33932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqge8-0007w5-1n for qemu-devel@nongnu.org; Mon, 26 Oct 2015 08:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zqge7-0006p5-6N for qemu-devel@nongnu.org; Mon, 26 Oct 2015 08:13:03 -0400 Date: Mon, 26 Oct 2015 13:12:54 +0100 From: Kevin Wolf Message-ID: <20151026121254.GC4044@noname.redhat.com> References: <1445270025-22999-1-git-send-email-mreitz@redhat.com> <1445270025-22999-39-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445270025-22999-39-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v7 38/39] hmp: Add read-only-mode option to change command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Alberto Garcia , qemu-block@nongnu.org, John Snow , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi Am 19.10.2015 um 17:53 hat Max Reitz geschrieben: > Expose the new read-only-mode option of 'blockdev-change-medium' for the > 'change' HMP command. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > @@ -1336,9 +1337,16 @@ void hmp_change(Monitor *mon, const QDict *qdict) > const char *device = qdict_get_str(qdict, "device"); > const char *target = qdict_get_str(qdict, "target"); > const char *arg = qdict_get_try_str(qdict, "arg"); > + const char *read_only = qdict_get_try_str(qdict, "read-only-mode"); > + BlockdevChangeReadOnlyMode read_only_mode = 0; > Error *err = NULL; > > if (strcmp(device, "vnc") == 0) { > + if (read_only) { > + monitor_printf(mon, > + "Parameter 'read-only-mode' is invalid for VNC"); Missing \n. > + return; > + } > if (strcmp(target, "passwd") == 0 || > strcmp(target, "password") == 0) { > if (!arg) { With that fixed: Reviewed-by: Kevin Wolf