From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfiJ6-0004n7-Ql for qemu-devel@nongnu.org; Sat, 26 Sep 2015 01:46:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfiJ3-00087B-CU for qemu-devel@nongnu.org; Sat, 26 Sep 2015 01:46:00 -0400 Received: from www.safe-mail.net ([212.29.227.230]:51622 helo=tapuz.safe-mail.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfiJ3-0007yL-4M for qemu-devel@nongnu.org; Sat, 26 Sep 2015 01:45:57 -0400 Date: Sat, 26 Sep 2015 01:45:54 -0400 From: "Namsun Ch'o" Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add real CDROM menu item List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: programmingkidx@gmail.com Cc: qemu-devel@nongnu.org > 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", &err); > + 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.