From owner-freebsd-questions Fri Jun 16 6:34:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smtp7.teleport.com (smtp7.teleport.com [192.108.254.51]) by hub.freebsd.org (Postfix) with SMTP id 2415837B5CF for ; Fri, 16 Jun 2000 06:34:54 -0700 (PDT) (envelope-from dirkm@buster.dhis.org) Received: (qmail 15777 invoked from network); 16 Jun 2000 13:34:45 -0000 Received: from pm3-01-22.cvo.du.teleport.com (HELO buster.dhis.org) (216.26.28.86) by smtp7.teleport.com with SMTP; 16 Jun 2000 13:34:45 -0000 Received: (from dirkm@localhost) by buster.dhis.org (8.9.3/8.9.2) id GAA43326; Fri, 16 Jun 2000 06:36:30 -0700 (PDT) (envelope-from dirkm) Date: Fri, 16 Jun 2000 06:36:30 -0700 From: Dirk Myers To: Chris Fedde Cc: James Johnson , freebsd-questions@FreeBSD.ORG Subject: Re: Error Codes Message-ID: <20000616063630.F17084@teleport.com> References: <200006160513.e5G5DN184066@fedde.littleton.co.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200006160513.e5G5DN184066@fedde.littleton.co.us>; from chris@fedde.littleton.co.us on Thu, Jun 15, 2000 at 11:13:23PM -0600 X-System: FreeBSD 3.4-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG An infinite number of monkeys (collectively referred to as "Chris Fedde") flailed at their keyboards, producing: > On Thu, 15 Jun 2000 20:45:29 -0700 "James Johnson" wrote: > +------------------ > | Hello, > | I'm coming from an NT background, where "error codes" are used to descr > ibe > | events. Does FreeBSD have a similar model? If so, Where can I got to pick up > | a list of definitions? > | > | Thanks > +------------------ > > One the disadvantages of opensource development is that there is > little if any coordination of messages generated by applications. > Thus there is no "list" of all the messages that a given freebsd > system might generate. For error codes returned by the actual system libraries, the macros mapping the mnemonic to the number are in /usr/include/errno.h (e.g., this is where ENOENT gets defined to be 2). There are very brief descriptions of the errors in that file; the man page for the function being called should more completely specify what a given error means in a certain context. For user-level applications, don't forget that the source is available for the majority of the applications you're likely to install on a FreeBSD system, and you can use that to determine what a particular error means in a particular context. (This sounds like a major PITA the first time you hear it -- at least it did to me -- but it's actually more useful than I expected with well-written code. Look at the man page for grep for how to find bits of text in files.) Dirk dirkm@teleport.com -- It's almost like we're doing Windows users a favor by charging them money for something they could get for free, because they get confused otherwise. -- Larry Wall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message