projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b83c18e
)
blkdebug: Allow usage without config file
author
Kevin Wolf
<kwolf@redhat.com>
Thu, 6 Dec 2012 13:32:55 +0000
(14:32 +0100)
committer
Kevin Wolf
<kwolf@redhat.com>
Wed, 12 Dec 2012 11:33:48 +0000
(12:33 +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 <kwolf@redhat.com>
block/blkdebug.c
patch
|
blob
|
history
diff --git
a/block/blkdebug.c
b/block/blkdebug.c
index d61ece86a9eb65e8e2506e99b20b5a669e2ce818..c9041ec3d245262f82e92e39685f549ee7d9d796 100644
(file)
--- 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;