From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1My6OS-0001QL-Mw for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:08:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My6OO-0001JJ-8t for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:08:04 -0400 Received: from [199.232.76.173] (port=57048 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My6ON-0001Iv-R1 for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:07:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55761) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1My6ON-0002Ej-BA for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:07:59 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9EG7wvB027400 for ; Wed, 14 Oct 2009 12:07:58 -0400 Message-ID: <4AD5F75B.3080702@redhat.com> Date: Wed, 14 Oct 2009 18:07:55 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Pass the drive's readonly attribute to the guest OS References: <4AD5F3BD.2040402@redhat.com> <4AD5F4FB.6040905@redhat.com> <4AD5F575.90901@redhat.com> In-Reply-To: <4AD5F575.90901@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Naphtali Sprei Cc: qemu-devel@nongnu.org On 10/14/09 17:59, Naphtali Sprei wrote: > Gerd Hoffmann wrote: >> On 10/14/09 17:52, Naphtali Sprei wrote: >>> Hi, >>> as a preliminary step for adding read only flag for the -drive >>> command, I've added code to pass >>> the (existing) read only attribute of the drive to the guest OS (if it >>> bother to ask). >>> >>> I've added for virtio and for scsi. >> >>> Where is usb ?? >> >> hw/usb-msd.c > > Thanks, > what I meant is I can't find how can it be specified as a drive interface. You can use either -usbdevice disk:/some/image (usb_add in monitor) or -drive if=none,id=pendrive,file=/some/image -device usb-storage,drive=pendrive (drive_add + device_add in monitor) cheers, Gerd