qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 03/23] do_snapshot_blkdev() error on missing snapsho


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 03/23] do_snapshot_blkdev() error on missing snapshot_file argument
Date: Mon, 24 Jan 2011 22:10:32 +0100

From: Jes Sorensen <address@hidden>

Current code does not support snapshot internally to the running
image. Error in case no snapshot_file is specified.

Signed-off-by: Jes Sorensen <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]