38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
|
|
From 3f9bed27de471be4d88ef9eb8270e1d362dccc4a Mon Sep 17 00:00:00 2001
|
||
|
|
From: zhujun2 <zhujun2_yewu@cmss.chinamobile.com>
|
||
|
|
Date: Mon, 4 Mar 2024 02:02:23 -0800
|
||
|
|
Subject: [PATCH] chardev/char.c: fix "abstract device type" error message
|
||
|
|
|
||
|
|
Current error message:
|
||
|
|
|
||
|
|
qemu-system-x86_64: -chardev spice,id=foo: Parameter 'driver' expects an abstract device type
|
||
|
|
|
||
|
|
while in fact the meaning is in reverse, -chardev expects
|
||
|
|
a non-abstract device type.
|
||
|
|
|
||
|
|
Fixes: 777357d758d9 ("chardev: qom-ify" 2016-12-07)
|
||
|
|
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
||
|
|
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
|
||
|
|
(cherry picked from commit 4ad87cd4b2254197b7ac12e3da824854e6a90f8f)
|
||
|
|
Signed-off-by: zhujun2 <zhujun2_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
chardev/char.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/chardev/char.c b/chardev/char.c
|
||
|
|
index 0169d8dde4..6bb99bd485 100644
|
||
|
|
--- a/chardev/char.c
|
||
|
|
+++ b/chardev/char.c
|
||
|
|
@@ -519,7 +519,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp)
|
||
|
|
|
||
|
|
if (object_class_is_abstract(oc)) {
|
||
|
|
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver",
|
||
|
|
- "an abstract device type");
|
||
|
|
+ "a non-abstract device type");
|
||
|
|
return NULL;
|
||
|
|
}
|
||
|
|
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|