qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/7] Revert "qdev: Add help for property value"


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH 3/7] Revert "qdev: Add help for property value"
Date: Fri, 29 Jan 2010 19:48:58 +0100

This reverts commit 922910ce42d15bdb7c2347436b1b5798b5401de4.

The commit has four issues:

* When it runs from the monitor, e.g. "device_add e1000,mac=?", it
  prints to stderr instead of the monitor.

* Help looks to callers just like failed device creation.  This makes
  main() exit unsuccessfully on "-device e1000,mac=?".

* It has an undocumented side effect on -global: "-global e1000.mac=?"
  prints help, but only when we actually add an e1000 device.

* It does not work for properties that accept the value "?".

We need to do this differently.

Signed-off-by: Markus Armbruster <address@hidden>
---
 hw/qdev-properties.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index f5ca05f..8547ad2 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -565,13 +565,8 @@ int qdev_prop_parse(DeviceState *dev, const char *name, 
const char *value)
         return -1;
     }
     if (prop->info->parse(dev, prop, value) != 0) {
-        if (strcmp(value, "?") != 0) {
-            fprintf(stderr, "property \"%s.%s\": failed to parse \"%s\"\n",
-                    dev->info->name, name, value);
-        } else {
-            fprintf(stderr, "%s.%s=%s\n",
-                    dev->info->name, name, prop->info->name);
-        }
+        fprintf(stderr, "property \"%s.%s\": failed to parse \"%s\"\n",
+                dev->info->name, name, value);
         return -1;
     }
     return 0;
-- 
1.6.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]