From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6TFX-0000g7-Kt for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:41:43 -0400 Received: from [140.186.70.92] (port=56362 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6TFW-0000eT-5c for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:41:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6TFR-0005yL-3w for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:41:41 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:51730) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6TFQ-0005y2-WC for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:41:37 -0400 Received: by vws3 with SMTP id 3so37323vws.4 for ; Mon, 26 Apr 2010 11:41:36 -0700 (PDT) Message-ID: <4BD5DE50.20204@codemonkey.ws> Date: Mon, 26 Apr 2010 13:41:20 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] give some useful error messages when tap open fails References: <20100422092826.EF03612B5C@gandalf.tls.msk.ru> <4BD196BB.6050603@redhat.com> <4BD19816.4050506@msgid.tls.msk.ru> <4BD1A080.2020202@redhat.com> In-Reply-To: <4BD1A080.2020202@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: Kevin Wolf Cc: Michael Tokarev , Markus Armbruster , qemu-devel@nongnu.org On 04/23/2010 08:28 AM, Kevin Wolf wrote: > Am 23.04.2010 14:52, schrieb Michael Tokarev: > >> Kevin Wolf wrote: >> >>> Am 22.04.2010 11:52, schrieb Markus Armbruster: >>> >>>> Michael Tokarev writes: >>>> >>>> >>>>> In net/tap-linux.c, when manipulation of /dev/net/tun fails, it prints >>>>> (with fprintf) something like this: >>>>> >>>>> >> [] >> >>>>> TFR(fd = open("/dev/net/tun", O_RDWR)); >>>>> if (fd< 0) { >>>>> - fprintf(stderr, "warning: could not open /dev/net/tun: no virtual network emulation\n"); >>>>> + qemu_error("could not open /dev/net/tun: %m\n"); >>>>> return -1; >>>>> >>> I'm not sure where this %m is defined exactly (Linux specific? Maybe >>> BSDs, too?), but it doesn't seem to work with mingw. >>> >> The file being patched is tap-linux.c. >> I noted this in my first email. >> > Sorry, I missed that. You're right, of course. > But from a consistency perspective, "%s", strerror(errno) would be nicer even if it's technically okay. Regards, Anthony Liguori > Kevin > > > >