Received: from [140.186.70.92] (port=45901 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PasII-0004cR-0K for qemu-devel@nongnu.org; Thu, 06 Jan 2011 11:02:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PasIG-0005Sg-KM for qemu-devel@nongnu.org; Thu, 06 Jan 2011 11:02:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PasIG-0005SU-DX for qemu-devel@nongnu.org; Thu, 06 Jan 2011 11:02:28 -0500 From: Jes.Sorensen@redhat.com Date: Thu, 6 Jan 2011 17:02:23 +0100 Message-Id: <1294329743-4844-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH] 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: 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 --- 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.3.4