[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-char: Print strerror message on failure
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-char: Print strerror message on failure |
Date: |
Tue, 21 Jun 2011 18:09:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Kevin Wolf <address@hidden> writes:
> The only way for chardev drivers to communicate an error was to return a NULL
> pointer, which resulted in an error message that said _that_ something went
> wrong, but not _why_.
>
> This patch changes the interface to return 0/-errno and updates
> qemu_chr_open_opts to use strerror to display a more helpful error message.
Returning the result through a pointer is awkward. What about stuffing
the error code into errno?