From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIOmW-0004EU-Fe for qemu-devel@nongnu.org; Wed, 09 Dec 2009 10:48:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIOmS-0004BN-2F for qemu-devel@nongnu.org; Wed, 09 Dec 2009 10:48:48 -0500 Received: from [199.232.76.173] (port=36544 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIOmR-0004BK-T2 for qemu-devel@nongnu.org; Wed, 09 Dec 2009 10:48:43 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:59576) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIOmR-0000Zz-8y for qemu-devel@nongnu.org; Wed, 09 Dec 2009 10:48:43 -0500 From: Arnd Bergmann Subject: Re: [Qemu-devel] Re: [PATCH, try 2, version 2] qemu/tap: add -net tap, dev= option Date: Wed, 9 Dec 2009 16:48:20 +0100 References: <200912081841.45075.arnd@arndb.de> <200912091549.04872.arnd@arndb.de> <20091209152728.GA4619@redhat.com> In-Reply-To: <20091209152728.GA4619@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912091648.20789.arnd@arndb.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" On Wednesday 09 December 2009, Michael S. Tsirkin wrote: > On Wed, Dec 09, 2009 at 03:49:04PM +0100, Arnd Bergmann wrote: > > > > - TFR(fd = open("/dev/net/tun", O_RDWR)); > > + if (!*dev) > > + dev = "/dev/net/tun"; > > + > > Did you test without dev parameter? I think dev will be NULL > so this will deference a nullpointer ... > probably if (!dev) is what you mean? D'oh. will fix. > will be neater if you put [,dev=str] after [,script=file] > Also - it does need a string, but only insofar as all options are strings. > Maybe dev=devfile or dev=file would be clearer. Yep. Thanks, Arnd