qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 29/43] blkdebug: Allow usage without config file


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 29/43] blkdebug: Allow usage without config file
Date: Thu, 13 Dec 2012 16:10:36 +0100

As soon as new rules can be set during runtime, as introduced by the
next patch, blkdebug makes sense even without a config file.

Signed-off-by: Kevin Wolf <address@hidden>
---
 block/blkdebug.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/block/blkdebug.c b/block/blkdebug.c
index d61ece8..c9041ec 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -240,6 +240,11 @@ static int read_config(BDRVBlkdebugState *s, const char 
*filename)
     int ret;
     struct add_rule_data d;
 
+    /* Allow usage without config file */
+    if (!*filename) {
+        return 0;
+    }
+
     f = fopen(filename, "r");
     if (f == NULL) {
         return -errno;
-- 
1.7.6.5




reply via email to

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