Skip to content

Commit

Permalink
blkdebug: Allow usage without config file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kevmw committed Dec 12, 2012
1 parent b83c18e commit 312a2ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block/blkdebug.c
Expand Up @@ -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;
Expand Down

0 comments on commit 312a2ba

Please sign in to comment.