]> git.feebdaed.xyz Git - 0xmirror/qemu.git/commit
hw/scsi: Use error_setg_file_open() for a better error message
authorMarkus Armbruster <armbru@redhat.com>
Fri, 21 Nov 2025 12:14:29 +0000 (13:14 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 25 Nov 2025 21:41:49 +0000 (22:41 +0100)
commit6d85f1d4492f0ef7347c488ae1d7f6f03a892573
treefa9b177b1fdf51cfca4f7e85ac29a747f3f6394a
parent622a0c9dee44f7a6c51e80644a3c5f3b132fbb7e
hw/scsi: Use error_setg_file_open() for a better error message

The error message changes from

    vhost-scsi: open vhost char device failed: REASON

to

    Could not open '/dev/vhost-scsi': REASON

I think the exact file name is more useful to know than the file's
purpose.

We could put back the "vhost-scsi: " prefix with error_prepend().  Not
worth the bother.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251121121438.1249498-7-armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/scsi/vhost-scsi.c