aboutsummaryrefslogtreecommitdiff
path: root/qemu-error.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-02-18 19:48:33 +0100
committerMarkus Armbruster <armbru@redhat.com>2010-03-16 16:58:32 +0100
commitcf5a65aaaf3e9382e50df550ba049a1c8691a5dd (patch)
treecefb10d2cab499ba0d7c76682503a309c187dc4a /qemu-error.h
parent65abca0a3441fb47024553e7676f6f3eef685a32 (diff)
error: Track locations in configuration files
New LOC_FILE. Use it for tracking file name and line number in qemu_config_parse(). We now report errors like qemu:foo.conf:42: Did not find I2C bus for smbus-eeprom In particular, gems like this message: -device: no driver specified become almost nice now: qemu:foo.conf:44: -device: no driver specified (A later commit will get rid of the bogus -device:)
Diffstat (limited to 'qemu-error.h')
-rw-r--r--qemu-error.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-error.h b/qemu-error.h
index 204dfb6a97..8f2a140ef2 100644
--- a/qemu-error.h
+++ b/qemu-error.h
@@ -15,7 +15,7 @@
typedef struct Location {
/* all members are private to qemu-error.c */
- enum { LOC_NONE } kind;
+ enum { LOC_NONE, LOC_FILE } kind;
int num;
const void *ptr;
struct Location *prev;
@@ -27,6 +27,7 @@ Location *loc_pop(Location *loc);
Location *loc_save(Location *loc);
void loc_restore(Location *loc);
void loc_set_none(void);
+void loc_set_file(const char *fname, int lno);
void error_vprintf(const char *fmt, va_list ap);
void error_printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));