On Thu, Sep 17, 2009 at 03:39:45PM +0100, Daniel P. Berrange wrote:
On Thu, Sep 17, 2009 at 03:33:24PM +0100, Richard W.M. Jones wrote:
>
> This caused me to waste about 3 hours looking for a non-existent "data
> corrupter" bug, which turned out to be the result of not checking the
> return value of xread ...
You might want to add
__attribute__((__warn_unused_result__))
to the header file decl of xread/xwrite so that the compiler will
warn if any other code areas forget to check the return error code
Good idea. Updated patch attached.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat
http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/