qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Unable to parse -device drivers containing commas?
@ 2013-05-30 10:00 Mark Cave-Ayland
  2013-05-30 12:07 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Cave-Ayland @ 2013-05-30 10:00 UTC (permalink / raw)
  To: qemu-devel

Hi all,

I found that the QEMU -device command line parser doesn't seem to like 
driver names containing a comma such as "SUNW,tcx" for the video driver 
on qemu-system-sparc:

$ ./qemu-system-sparc -device SUNW,tcx,help
qemu-system-sparc: -device SUNW,tcx,help: Parameter 'driver' expects 
device type
$ ./qemu-system-sparc -device 'SUNW,tcx',help
qemu-system-sparc: -device SUNW,tcx,help: Parameter 'driver' expects 
device type
$ ./qemu-system-sparc -device "SUNW,tcx",help
qemu-system-sparc: -device SUNW,tcx,help: Parameter 'driver' expects 
device type

If I try temporarily removing the comma from the TypeInfo name field in 
hw/display/tcx.c then all is fine:

$ ./qemu-system-sparc -device 'SUNWtcx',help
SUNWtcx.vram_size=hex32
SUNWtcx.width=uint16
SUNWtcx.height=uint16
SUNWtcx.depth=uint16
$ ./qemu-system-sparc -device SUNWtcx,help
SUNWtcx.vram_size=hex32
SUNWtcx.width=uint16
SUNWtcx.height=uint16
SUNWtcx.depth=uint16

Note that there are a couple of other devices in the SPARC32 device tree 
with this problem, since the general device naming convention on SPARC 
is in the form <manufacturer>,<device>. Is there a way of escaping the 
commas on the command line so that it is possible to list properties for 
drivers named in this way?


Many thanks,

Mark.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Unable to parse -device drivers containing commas?
  2013-05-30 10:00 [Qemu-devel] Unable to parse -device drivers containing commas? Mark Cave-Ayland
@ 2013-05-30 12:07 ` Eric Blake
  2013-05-31  7:56   ` Mark Cave-Ayland
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2013-05-30 12:07 UTC (permalink / raw)
  To: Mark Cave-Ayland; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

On 05/30/2013 04:00 AM, Mark Cave-Ayland wrote:
> Hi all,
> 
> I found that the QEMU -device command line parser doesn't seem to like
> driver names containing a comma such as "SUNW,tcx" for the video driver
> on qemu-system-sparc:
> 
> $ ./qemu-system-sparc -device SUNW,tcx,help

>  Is there a way of escaping the
> commas on the command line so that it is possible to list properties for
> drivers named in this way?

Commas are escaped by doubling them.  Try ./qemu-system-sparc -device
SUNW,,tcx,help

That's the generic quoting we've used for escaping commas in all new
command line options, although there may be some older options that
still need to be taught to honor that escaping.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Unable to parse -device drivers containing commas?
  2013-05-30 12:07 ` Eric Blake
@ 2013-05-31  7:56   ` Mark Cave-Ayland
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Cave-Ayland @ 2013-05-31  7:56 UTC (permalink / raw)
  To: Eric Blake; +Cc: qemu-devel

On 30/05/13 13:07, Eric Blake wrote:

>>   Is there a way of escaping the
>> commas on the command line so that it is possible to list properties for
>> drivers named in this way?
>
> Commas are escaped by doubling them.  Try ./qemu-system-sparc -device
> SUNW,,tcx,help
>
> That's the generic quoting we've used for escaping commas in all new
> command line options, although there may be some older options that
> still need to be taught to honor that escaping.

Hi Eric,

Yes that works absolutely fine here - thanks for the pointer!


Many thanks,

Mark.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-31  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 10:00 [Qemu-devel] Unable to parse -device drivers containing commas? Mark Cave-Ayland
2013-05-30 12:07 ` Eric Blake
2013-05-31  7:56   ` Mark Cave-Ayland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).