[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qdev: Workaround for an issue caused by noglob opti
From: |
Lin Ma |
Subject: |
[Qemu-devel] [PATCH] qdev: Workaround for an issue caused by noglob option of shell for -device ? |
Date: |
Sun, 26 Jun 2016 19:53:06 +0800 |
If there is any filename in current path matching wildcard ?, This filename will
be passed into -device ? while 'pathname expansion' isn't disabled by noglob of
shell built-in option, qemu reports error in this case.
Signed-off-by: Lin Ma <address@hidden>
---
qdev-monitor.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/qdev-monitor.c b/qdev-monitor.c
index e19617f..f6443cd 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -257,6 +257,11 @@ int qdev_device_help(QemuOpts *opts)
DevicePropertyInfoList *prop;
driver = qemu_opt_get(opts, "driver");
+
+ if (driver && access(driver, F_OK == 0) && strlen(driver) == 1) {
+ driver = "?";
+ }
+
if (driver && is_help_option(driver)) {
qdev_print_devinfos(false);
return 1;
--
2.8.1
- [Qemu-devel] [PATCH] qdev: Workaround for an issue caused by noglob option of shell for -device ?,
Lin Ma <=