From: Markus Armbruster <armbru@redhat.com>
To: Lin Ma <lma@suse.com>
Cc: eblake@redhat.com, mst@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qdev: Workaround for an issue caused by noglob option of shell for -device ?
Date: Mon, 27 Jun 2016 08:29:57 +0200 [thread overview]
Message-ID: <8760svcffe.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1466941986-4587-1-git-send-email-lma@suse.com> (Lin Ma's message of "Sun, 26 Jun 2016 19:53:06 +0800")
Lin Ma <lma@suse.com> writes:
> 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 <lma@suse.com>
> ---
> 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;
I'm afraid this would silently interpret any one-character driver name
as a request for help when a file with this name exists. Not a good
idea. Example: "-device .".
"-device ?" and similar use of "?" elsewhere is deprecated. Please use
"-device help".
next prev parent reply other threads:[~2016-06-27 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-26 11:53 [Qemu-devel] [PATCH] qdev: Workaround for an issue caused by noglob option of shell for -device ? Lin Ma
2016-06-27 6:29 ` Markus Armbruster [this message]
2016-06-27 14:31 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760svcffe.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=lma@suse.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.