diff options
author | Kevin Wolf <kwolf@redhat.com> | 2012-12-06 14:32:55 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-12-12 12:33:48 +0100 |
commit | 312a2ba0eb8ab19646517aeaa785475d3fbcfd51 (patch) | |
tree | 2f2efc7e3d7b5da67703199b37e8007b51c984ce /block/blkdebug.c | |
parent | b83c18e225cf82a21535561270b6dfd86b1c9031 (diff) | |
download | qemu-312a2ba0eb8ab19646517aeaa785475d3fbcfd51.zip qemu-312a2ba0eb8ab19646517aeaa785475d3fbcfd51.tar.gz qemu-312a2ba0eb8ab19646517aeaa785475d3fbcfd51.tar.bz2 |
blkdebug: Allow usage without config file
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>
Diffstat (limited to 'block/blkdebug.c')
-rw-r--r-- | 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; |