Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add real CDROM menu item

2015-10-13 Thread Peter Maydell
On 26 September 2015 at 04:01, Programmingkid  wrote:
> Add a menu item to the Machine menu called "Use Real CDROM". It gives the user
> the ability to use a real CDROM disc with QEMU by simply selecting a menu 
> item.
>
> Signed-off-by: John Arbuckle 

This feature is not present in any of our other UI frontends,
and the implementation makes assumptions about the names of
block devices in the models (ie that if it has "cd" in the name
anywhere it's a CD). I also don't have a mac with a CD drive
so I have no way of testing it.

I'm afraid that I think that this comes under the heading of
"features that should be in the VM management layer, not QEMU
itself", so I would prefer not to take it into QEMU.

thanks
-- PMM



Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add real CDROM menu item

2015-10-13 Thread Programmingkid

On Oct 13, 2015, at 4:44 PM, Peter Maydell wrote:

> On 26 September 2015 at 04:01, Programmingkid  
> wrote:
>> Add a menu item to the Machine menu called "Use Real CDROM". It gives the 
>> user
>> the ability to use a real CDROM disc with QEMU by simply selecting a menu 
>> item.
>> 
>> Signed-off-by: John Arbuckle 
> 
> This feature is not present in any of our other UI frontends,
> and the implementation makes assumptions about the names of
> block devices in the models (ie that if it has "cd" in the name
> anywhere it's a CD). I also don't have a mac with a CD drive
> so I have no way of testing it.
> 
> I'm afraid that I think that this comes under the heading of
> "features that should be in the VM management layer, not QEMU
> itself", so I would prefer not to take it into QEMU.

Mac OS X users don't have any VM management layer. That is pretty much
a Linux-only feature. What we do have is the cocoa interface. 




Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add real CDROM menu item

2015-09-26 Thread Programmingkid

On Sep 26, 2015, at 1:45 AM, Namsun Ch'o wrote:

>> Add a menu item to the Machine menu called "Use Real CDROM". It gives the
>> user the ability to use a real CDROM with QEMU by simply selecting a menu
>> item.
> 
>> NSASCIIStringEncoding];
>> +qmp_change_blockdev(device, "/dev/cdrom", "raw", );
>> +handleAnyDeviceErrors(err);
> 
> Not all systems put their CDROM in /dev/cdrom. And you can already select the
> machine's real CDROM hardware by doing -cdrom /dev/cdrom (or /dev/sr0, etc).
> Examples of device files for CDROMs on other systems:
> 
> /dev/sr0
> /dev/cd0
> /dev/sdc0
> /dev/acd0c
> /dev/cdrom0
> /dev/disk1s0
> /dev/scsi/sc0d
> /dev/dsk/c1t0d0s0
> /dev/rdsk/dks0d1vh
> 
> And of course many of the numbers here increment on systems with multiple
> drives. There is seriously an insane amount of variation of the names of CDROM
> drives. Don't assume that it will only be /dev/cdrom and hardcode it that way.


Actually on Mac OS X, /dev/cdrom always points to the optical drive. It is how 
QEMU is programmed.


Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add real CDROM menu item

2015-09-26 Thread Namsun Ch'o
> Actually on Mac OS X, /dev/cdrom always points to the optical drive.
> It is how QEMU is programmed.

Is this only for Mac? I must have missed that.



Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add real CDROM menu item

2015-09-26 Thread Programmingkid

On Sep 26, 2015, at 6:49 PM, Namsun Ch'o wrote:

>> Actually on Mac OS X, /dev/cdrom always points to the optical drive.
>> It is how QEMU is programmed.
> 
> Is this only for Mac? I must have missed that.

Yes, it is for the Macintosh's cocoa interface.



Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add real CDROM menu item

2015-09-25 Thread Namsun Ch'o
> Add a menu item to the Machine menu called "Use Real CDROM". It gives the
> user the ability to use a real CDROM with QEMU by simply selecting a menu
> item.

> NSASCIIStringEncoding];
> +qmp_change_blockdev(device, "/dev/cdrom", "raw", );
> +handleAnyDeviceErrors(err);

Not all systems put their CDROM in /dev/cdrom. And you can already select the
machine's real CDROM hardware by doing -cdrom /dev/cdrom (or /dev/sr0, etc).
Examples of device files for CDROMs on other systems:

/dev/sr0
/dev/cd0
/dev/sdc0
/dev/acd0c
/dev/cdrom0
/dev/disk1s0
/dev/scsi/sc0d
/dev/dsk/c1t0d0s0
/dev/rdsk/dks0d1vh

And of course many of the numbers here increment on systems with multiple
drives. There is seriously an insane amount of variation of the names of CDROM
drives. Don't assume that it will only be /dev/cdrom and hardcode it that way.