From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60459 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhTfK-0000qM-F0 for qemu-devel@nongnu.org; Mon, 24 Jan 2011 16:09:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhTfF-0007Jw-2N for qemu-devel@nongnu.org; Mon, 24 Jan 2011 16:09:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhTfE-0007Jj-QK for qemu-devel@nongnu.org; Mon, 24 Jan 2011 16:09:29 -0500 From: Kevin Wolf Date: Mon, 24 Jan 2011 22:10:32 +0100 Message-Id: <1295903452-18017-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1295903452-18017-1-git-send-email-kwolf@redhat.com> References: <1295903452-18017-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 03/23] do_snapshot_blkdev() error on missing snapshot_file argument List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Jes Sorensen Current code does not support snapshot internally to the running image. Error in case no snapshot_file is specified. Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- blockdev.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/blockdev.c b/blockdev.c index d7add36..662f7a9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -526,6 +526,12 @@ int do_snapshot_blkdev(Monitor *mon, const QDict *qdict, QObject **ret_data) int ret = 0; int flags; + if (!filename) { + qerror_report(QERR_MISSING_PARAMETER, "snapshot_file"); + ret = -1; + goto out; + } + bs = bdrv_find(device); if (!bs) { qerror_report(QERR_DEVICE_NOT_FOUND, device); -- 1.7.2.3