mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
qemu-char: use more specific error_setg_* variants
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
e859eda585
commit
20c397607c
@ -2604,7 +2604,7 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool do_nodelay,
|
||||
|
||||
memset(&ss, 0, ss_len);
|
||||
if (getsockname(fd, (struct sockaddr *) &ss, &ss_len) != 0) {
|
||||
error_setg(errp, "getsockname: %s", strerror(errno));
|
||||
error_setg_errno(errp, errno, "getsockname");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -3529,7 +3529,7 @@ static int qmp_chardev_open_file_source(char *src, int flags,
|
||||
|
||||
TFR(fd = qemu_open(src, flags, 0666));
|
||||
if (fd == -1) {
|
||||
error_setg(errp, "open %s: %s", src, strerror(errno));
|
||||
error_setg_file_open(errp, errno, src);
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user