From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 10 13:13:56 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5FA837B401 for ; Thu, 10 Jul 2003 13:13:56 -0700 (PDT) Received: from skippyii.compar.com (mail.compar.com [216.208.38.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id E207543FAF for ; Thu, 10 Jul 2003 13:13:53 -0700 (PDT) (envelope-from matt@compar.com) Received: from skippyii (skippyii [216.208.38.130]) by skippyii.compar.com (8.11.3/8.11.3) with ESMTP id h6AKLps32279; Thu, 10 Jul 2003 16:21:52 -0400 (EDT) (envelope-from matt@compar.com) Date: Thu, 10 Jul 2003 16:21:50 -0400 (EDT) From: Matthew Emmerton To: Terry Lambert In-Reply-To: <3F084B85.5CF7F6B0@mindspring.com> Message-ID: <20030710162030.R32209-100000@skippyii.compar.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: RFC: Change to sys_errlist X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2003 20:13:57 -0000 On Sun, 6 Jul 2003, Terry Lambert wrote: > 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. Agreed. I thought this over and read some specs and believe our way is the right way. -- Matthew Emmerton Computer Partners IT Specialist