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>
This commit is contained in:
parent
b83c18e225
commit
312a2ba0eb
|
@ -240,6 +240,11 @@ static int read_config(BDRVBlkdebugState *s, const char *filename)
|
||||||
int ret;
|
int ret;
|
||||||
struct add_rule_data d;
|
struct add_rule_data d;
|
||||||
|
|
||||||
|
/* Allow usage without config file */
|
||||||
|
if (!*filename) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
f = fopen(filename, "r");
|
f = fopen(filename, "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
Loading…
Reference in a new issue