Revision dcfb0939 qemu-config.c
b/qemu-config.c | ||
---|---|---|
488 | 488 |
loc_pop(&loc); |
489 | 489 |
return res; |
490 | 490 |
} |
491 |
|
|
492 |
int qemu_read_config_file(const char *filename) |
|
493 |
{ |
|
494 |
FILE *f = fopen(filename, "r"); |
|
495 |
if (f == NULL) { |
|
496 |
return -errno; |
|
497 |
} |
|
498 |
|
|
499 |
if (qemu_config_parse(f, filename) != 0) { |
|
500 |
return -EINVAL; |
|
501 |
} |
|
502 |
fclose(f); |
|
503 |
|
|
504 |
return 0; |
|
505 |
} |
Also available in: Unified diff