From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47051 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OokFM-0007vb-HX for qemu-devel@nongnu.org; Thu, 26 Aug 2010 17:44:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OokFH-0000Fv-Ad for qemu-devel@nongnu.org; Thu, 26 Aug 2010 17:44:32 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:58275 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OokFH-0000FO-14 for qemu-devel@nongnu.org; Thu, 26 Aug 2010 17:44:27 -0400 Date: Fri, 27 Aug 2010 01:44:14 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] [PATCH 1/3] Add TPM 1.2 host device passthrough interface In-Reply-To: Message-ID: References: <1282753982-1761-1-git-send-email-andreas.niederl@iaik.tugraz.at> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="33734824-221946769-1282859056=:1495" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Andreas Niederl , qemu-devel@nongnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --33734824-221946769-1282859056=:1495 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 26 Aug 2010, Blue Swirl wrote: > On Wed, Aug 25, 2010 at 8:46 PM, malc wrote: > > On Wed, 25 Aug 2010, Blue Swirl wrote: > > > >> On Wed, Aug 25, 2010 at 4:33 PM, Andreas Niederl > >> wrote: > >> > This implementation is based on the TPM 1.2 interface for virtualized TPM > >> > devices from the Xen-4.0.0 ioemu-qemu-xen fork. > >> > [..snip..] > >> There's hw_error() and errx(), no need to reinvent the wheel. > > > > Since it looks as if this code was based on mine, i take issues with > > your analysis. > > > > Firstly hw_error is for hardware errors and does not print message > > corresponding to errno code > > Right, the correct function should be error_report(). Which is not at all the same as err/errx or die/die2 (doesn't abort/exit) [FWIW die/die2 predates error_report, furthermore error_report kind of breaks the convention that public functions/helpers have a qemu_ prefix] > > > and lastly there is no errx[1] > > > > [..snip..] > > > > [1] err(3): > >    CONFORMING TO > >       These functions are non-standard BSD extensions. > > err() and errx() are already used somewhere. But these should be > converted to error_report etc., like other printf based local > functions. > Only in Linux specific nbd code. -- mailto:av1474@comtv.ru --33734824-221946769-1282859056=:1495--