diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2011-01-06 17:02:23 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-01-24 11:08:50 +0100 |
commit | c90f1b3297943f2f142d8114bef1092f9ac9acef (patch) | |
tree | dd41f43373d6f8f02f34f78f63a393c4b45cefd6 | |
parent | 710da702beb0dc4aeeab1b9e712cd9473b083a89 (diff) |
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 <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | blockdev.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |