From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfHLi-0005Bj-3P for qemu-devel@nongnu.org; Wed, 10 Feb 2010 13:31:42 -0500 Received: from [199.232.76.173] (port=49496 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfHLh-0005BP-NN for qemu-devel@nongnu.org; Wed, 10 Feb 2010 13:31:41 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfHLg-00017g-Ev for qemu-devel@nongnu.org; Wed, 10 Feb 2010 13:31:41 -0500 Received: from mail-iw0-f194.google.com ([209.85.223.194]:46951) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfHLg-000178-7C for qemu-devel@nongnu.org; Wed, 10 Feb 2010 13:31:40 -0500 Received: by mail-iw0-f194.google.com with SMTP id 32so527339iwn.14 for ; Wed, 10 Feb 2010 10:31:40 -0800 (PST) Message-ID: <4B72FB89.1040702@codemonkey.ws> Date: Wed, 10 Feb 2010 12:31:37 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Do not ignore error, if open file failed (-serial /dev/tty) References: <20100128184446.GA21065@rain> In-Reply-To: <20100128184446.GA21065@rain> 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: Evgeniy Dushistov Cc: qemu-devel@nongnu.org On 01/28/2010 12:44 PM, Evgeniy Dushistov wrote: > In case, when qemu is executed with option like > -serial /dev/ttyS0, report if there are problems with > opening of devices. At now errors are silently ignoring. > > Signed-off-by: Evgeniy Dushistov > Applied. Thanks. Regards, Anthony Liguori > --- > qemu-char.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index 800ee6c..75dbf66 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -1180,6 +1180,9 @@ static CharDriverState *qemu_chr_open_tty(QemuOpts *opts) > int fd; > > TFR(fd = open(filename, O_RDWR | O_NONBLOCK)); > + if (fd< 0) { > + return NULL; > + } > tty_serial_init(fd, 115200, 'N', 8, 1); > chr = qemu_chr_open_fd(fd, fd); > if (!chr) { >