diff options
author | Markus Armbruster <armbru@redhat.com> | 2010-02-18 19:56:01 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2010-03-16 16:58:32 +0100 |
commit | ef82516d8fb41cbae9703d07516641f6bdf91a77 (patch) | |
tree | 1b43e98ae4d2efcaad9e6999919ac37a1e85703f | |
parent | cf5a65aaaf3e9382e50df550ba049a1c8691a5dd (diff) |
QemuOpts: Fix qemu_config_parse() to catch file read errors
-rw-r--r-- | qemu-config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qemu-config.c b/qemu-config.c index 2de97cde29..ad130fbebe 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -475,6 +475,10 @@ int qemu_config_parse(FILE *fp, const char *fname) error_report("parse error"); goto out; } + if (ferror(fp)) { + error_report("error reading file"); + goto out; + } res = 0; out: loc_pop(&loc); |