Hi Markus,
On 21/11/25 13:14, Markus Armbruster wrote:
> The error message changes from
>
> open FILENAME failed
>
> to
>
> Could not create 'FILENAME': REASON
>
> where REASON is the value of strerror(errno).
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/usb/bus.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/usb/bus.c b/hw/usb/bus.c
> index 8dd2ce415e..714e33989f 100644
> --- a/hw/usb/bus.c
> +++ b/hw/usb/bus.c
> @@ -259,10 +259,9 @@ static void usb_qdev_realize(DeviceState *qdev, Error **errp)
> }
>
> if (dev->pcap_filename) {
> - int fd = qemu_open_old(dev->pcap_filename,
> - O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0666);
> + int fd = qemu_create(dev->pcap_filename,
> + O_WRONLY | O_TRUNC | O_BINARY, 0666, errp);
> if (fd < 0) {
> - error_setg(errp, "open %s failed", dev->pcap_filename);
> usb_qdev_unrealize(qdev);
OK, but why not update usb_qdev_realize() in the same patch?
> return;
> }
Similarly, I don't get why you updated this (and the following patch),
without also doing the similar:
- qemu_chr_open_pipe()
- qmp_chardev_open_file_source() and qmp_screendump()
- s390_qmp_dump_skeys()
Anyhow, for this patch:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>