From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1My6tf-000856-MG for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:40:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My6ta-0007x0-Mz for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:40:19 -0400 Received: from [199.232.76.173] (port=60604 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My6ta-0007wM-CB for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:40:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13568) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1My6mW-0006bH-Ko for qemu-devel@nongnu.org; Wed, 14 Oct 2009 12:32:56 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9EGWsKe019420 for ; Wed, 14 Oct 2009 12:32:54 -0400 Message-ID: <4AD5FD31.9040900@redhat.com> Date: Wed, 14 Oct 2009 18:32:49 +0200 From: Naphtali Sprei 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> <4AD5F75B.3080702@redhat.com> In-Reply-To: <4AD5F75B.3080702@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Gerd Hoffmann wrote: > 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 > > > Thanks. Verified, it "works", meaning readonly attribute passed to guest.