From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOnKg-00079h-U0 for qemu-devel@nongnu.org; Tue, 24 May 2011 04:51:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOnKg-00053o-17 for qemu-devel@nongnu.org; Tue, 24 May 2011 04:51:18 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:43392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOnKf-00053k-Td for qemu-devel@nongnu.org; Tue, 24 May 2011 04:51:17 -0400 Received: by gyg4 with SMTP id 4so2938335gyg.4 for ; Tue, 24 May 2011 01:51:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1306221378-29904-1-git-send-email-mohan@in.ibm.com> References: <1306221378-29904-1-git-send-email-mohan@in.ibm.com> Date: Tue, 24 May 2011 09:51:17 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2] virtio-9p: Add Read only support for 9p export. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "M. Mohan Kumar" Cc: rlandley@parallels.com, qemu-devel@nongnu.org On Tue, May 24, 2011 at 8:16 AM, M. Mohan Kumar wrote: > @@ -192,6 +196,9 @@ QemuOptsList qemu_virtfs_opts =3D { > =A0 =A0 =A0 =A0 }, { > =A0 =A0 =A0 =A0 =A0 =A0 .name =3D "security_model", > =A0 =A0 =A0 =A0 =A0 =A0 .type =3D QEMU_OPT_STRING, > + =A0 =A0 =A0 =A0}, { > + =A0 =A0 =A0 =A0 =A0 =A0.name =3D "readonly", > + =A0 =A0 =A0 =A0 =A0 =A0.type =3D QEMU_OPT_STRING, Sorry to bug about bool again but there is a type QEMU_OPT_BOOL and it is worth using. You can get the value using qemu_opt_get_bool(). It handles the parse error case when not on|off so you don't need to duplicate that code. Stefan