Do not ignore error, if open file failed (-serial /dev/tty)
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>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit afc535acb5
)
This commit is contained in:
parent
b57a2297f2
commit
02510b2436
|
@ -1180,6 +1180,9 @@ static CharDriverState *qemu_chr_open_tty(QemuOpts *opts)
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
TFR(fd = open(filename, O_RDWR | O_NONBLOCK));
|
TFR(fd = open(filename, O_RDWR | O_NONBLOCK));
|
||||||
|
if (fd < 0) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
tty_serial_init(fd, 115200, 'N', 8, 1);
|
tty_serial_init(fd, 115200, 'N', 8, 1);
|
||||||
chr = qemu_chr_open_fd(fd, fd);
|
chr = qemu_chr_open_fd(fd, fd);
|
||||||
if (!chr) {
|
if (!chr) {
|
||||||
|
|
Loading…
Reference in New Issue