Received: from eggs.gnu.org ([140.186.70.92]:46257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ3WG-0006so-4F for qemu-devel@nongnu.org; Tue, 21 Jun 2011 12:09:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZ3WE-0006a1-3U for qemu-devel@nongnu.org; Tue, 21 Jun 2011 12:09:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ3WD-0006Zs-If for qemu-devel@nongnu.org; Tue, 21 Jun 2011 12:09:37 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5LG9abx002592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 Jun 2011 12:09:36 -0400 From: Markus Armbruster References: <1306927751-8352-1-git-send-email-kwolf@redhat.com> Date: Tue, 21 Jun 2011 18:09:34 +0200 In-Reply-To: <1306927751-8352-1-git-send-email-kwolf@redhat.com> (Kevin Wolf's message of "Wed, 1 Jun 2011 13:29:11 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] qemu-char: Print strerror message on failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org Kevin Wolf writes: > The only way for chardev drivers to communicate an error was to return a NULL > pointer, which resulted in an error message that said _that_ something went > wrong, but not _why_. > > This patch changes the interface to return 0/-errno and updates > qemu_chr_open_opts to use strerror to display a more helpful error message. Returning the result through a pointer is awkward. What about stuffing the error code into errno?