Skip to contentSkip to conversation

qmp: Fix argument name in error message of device-list-properties

PATCH Applied Lin Ma 2 participants 3 messages Jan 25, 2017

lore
Share & tools
lore

Lin Ma

author
#0 lore raw

PATCH v2 1/1 qmp: Fix argument name in error message of device-list-properties

The argument is called "typename", not "name".

[Thanks to Markus for correcting the commit message]

---
 qmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
qmp.c +2 -2
index 0028f0b..886059e 100644
@@ -531,12 +531,12 @@ DevicePropertyInfoList *qmp_device_list_properties(const char *typename,
 
     klass = object_class_dynamic_cast(klass, TYPE_DEVICE);
     if (klass == NULL) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name", TYPE_DEVICE);
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename", TYPE_DEVICE);
         return NULL;
     }
 
     if (object_class_is_abstract(klass)) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name",
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename",
                    "non-abstract device type");
         return NULL;
     }
Signature · 1 line
2.9.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 18 lines · Lin Ma

The argument is called "typename", not "name".

[Thanks to Markus for correcting the commit message]

---
 qmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
qmp.c +0 -1
index 0028f0b..886059e 100644
@@ -531,12 +531,12 @@ DevicePropertyInfoList *qmp_device_list_properties(const char *typename,
 
     klass = object_class_dynamic_cast(klass, TYPE_DEVICE);
     if (klass == NULL) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name", TYPE_DEVICE);

qmp.c DevicePropertyInfoList *qmp_device_list_properties(const char *typename, · line 542

Quoted 10 lines
qmp.c +2 -1
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename", TYPE_DEVICE);
         return NULL;
     }
 
     if (object_class_is_abstract(klass)) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name",
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename",
                    "non-abstract device type");
         return NULL;
     }
#2 lore raw
Quoted 24 lines · Markus Armbruster
Quoted 22 lines · Lin Ma

The argument is called "typename", not "name".

[Thanks to Markus for correcting the commit message]

---
 qmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
qmp.c +1 -1
index 0028f0b..886059e 100644
@@ -531,12 +531,12 @@ DevicePropertyInfoList *qmp_device_list_properties(const char *typename,
 
     klass = object_class_dynamic_cast(klass, TYPE_DEVICE);
     if (klass == NULL) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name", TYPE_DEVICE);
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename", TYPE_DEVICE);
         return NULL;
     }
 
Quoted 8 lines

qmp.c DevicePropertyInfoList *qmp_device_list_properties(const char *typename, · line 542

Quoted 6 lines
qmp.c +1 -1
     if (object_class_is_abstract(klass)) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name",
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename",
                    "non-abstract device type");
         return NULL;
     }

Applied to my tree, thanks!

http://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qapi-next