* [Qemu-devel] [PATCH] Do not ignore error, if open file failed (-serial /dev/tty)
@ 2010-01-28 18:44 Evgeniy Dushistov
2010-02-10 18:31 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Evgeniy Dushistov @ 2010-01-28 18:44 UTC (permalink / raw)
To: qemu-devel
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 <dushistov@mail.ru>
---
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) {
--
1.6.5.6
--
/Evgeniy
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Do not ignore error, if open file failed (-serial /dev/tty)
2010-01-28 18:44 [Qemu-devel] [PATCH] Do not ignore error, if open file failed (-serial /dev/tty) Evgeniy Dushistov
@ 2010-02-10 18:31 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2010-02-10 18:31 UTC (permalink / raw)
To: Evgeniy Dushistov; +Cc: qemu-devel
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<dushistov@mail.ru>
>
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) {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-10 18:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 18:44 [Qemu-devel] [PATCH] Do not ignore error, if open file failed (-serial /dev/tty) Evgeniy Dushistov
2010-02-10 18:31 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).