From c90f1b3297943f2f142d8114bef1092f9ac9acef Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 6 Jan 2011 17:02:23 +0100 Subject: [PATCH] do_snapshot_blkdev() error on missing snapshot_file argument 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 file changed, 6 insertions(+) diff --git a/blockdev.c b/blockdev.c index d7add36929..662f7a9d86 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); -- 2.11.4.GIT