qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-commits] [COMMIT 850810d] Improve error reporting on file acce


From: malc
Subject: Re: [Qemu-commits] [COMMIT 850810d] Improve error reporting on file access
Date: Tue, 6 Oct 2009 02:08:14 +0400 (MSD)

On Mon, 5 Oct 2009, Gerd Hoffmann wrote:

> On 10/05/09 22:46, Anthony Liguori wrote:
> 
> > > The neat being that some of the conditions under which this code runs
> > > do set errno while others have nothing to do with it..
> 
> > Yeah but I figured that a bad errmsg is more useful than nothing.
> 
> You mean those funny things like "open $file failed: Success"?
> Not so funny in case the errno string is plausible but wrong.

One also has to bear in mind that succeeded calls do not zero errno on
success, so it might be ": Success", might be ": Invalid or incomplete
multibyte or wide character". It was said somewhere that no comments
are better than wrong comments, same applies here.

> 
> > Getting errno to be reliable is tough because in these paths, there are
> > various function calls that can throw off errno.
> 
> IMO errno should not be used if it isn't reliable.
> 
> cheers,
>   Gerd
> 

-- 
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]