Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Jul 2003 09:17:09 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Matthew Emmerton <matt@gsicomp.on.ca>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: RFC: Change to sys_errlist
Message-ID:  <3F084B85.5CF7F6B0@mindspring.com>
References:  <001901c34256$95e4db10$1200a8c0@gsicomp.on.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Emmerton wrote:
> This is a RFC on a change to sys_errlist for errno = 0.
> 
> On Linux, if perror() or strerror() is called with errno = 0, the resulting
> string is "Success".
> On FreeBSD, the resulting string is "Unknown error: 0".
> 
> I think that FreeBSD's output is unintentionally confusing, as errno = 0
> implies success.
> 
> The following patch will change the output to the Linux behaviour.
> 
> I appreciate any comments.

Actually, I ran into a situation on MacOS X the other day that had
a system call with a -1 return code with an errno == 0.

I would personally like to distinguish this case, if only for the
purpose of catching kernel errors.  Saying "Success" when in fact
the system call is returning -1 is a bogus thing to do.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F084B85.5CF7F6B0>