From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bH8d9-0007xj-GI for qemu-devel@nongnu.org; Sun, 26 Jun 2016 07:53:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bH8d5-0001HO-BW for qemu-devel@nongnu.org; Sun, 26 Jun 2016 07:53:38 -0400 Received: from prv3-mh.provo.novell.com ([137.65.250.26]:56687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bH8d5-0001HE-5R for qemu-devel@nongnu.org; Sun, 26 Jun 2016 07:53:35 -0400 From: Lin Ma Date: Sun, 26 Jun 2016 19:53:06 +0800 Message-Id: <1466941986-4587-1-git-send-email-lma@suse.com> Subject: [Qemu-devel] [PATCH] qdev: Workaround for an issue caused by noglob option of shell for -device ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: armbru@redhat.com, eblake@redhat.com, mst@redhat.com, qemu-devel@nongnu.org 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 --- 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