From 0f0bc3f1d526924ef4a75ad25dd0ec3771a66496 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 18 Feb 2010 20:13:51 +0100 Subject: error: Track locations on command line New LOC_CMDLINE. Use it for tracking option with argument in lookup_opt(). We now report errors like this qemu: -device smbus-eeprom: Did not find I2C bus for smbus-eeprom --- qemu-error.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qemu-error.h') diff --git a/qemu-error.h b/qemu-error.h index 8f2a140..88e0b70 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, LOC_FILE } kind; + enum { LOC_NONE, LOC_CMDLINE, 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_cmdline(char **argv, int idx, int cnt); void loc_set_file(const char *fname, int lno); void error_vprintf(const char *fmt, va_list ap); -- cgit v1.1