Message ID: 273778
Posted By: nobbutl
Posted On: 2005-06-14 19:27:00
Subject: usr/src/uts/common/sys/errno.h
/*
* Copyright 2000 Sun Microsystems,
Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights
Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
*
University Acknowledgment- Portions of this document are derived from
* software
developed by the University of California, Berkeley, and its
* contributors.
*/
Message ID: 273784
Posted By: nobbutl
Posted On: 2005-06-14 19:51:00
Subject: Re: errno.h part I
In fact, under CDDL 2.1(a) I can
"2. License
Grants.
2.1. The Initial Developer Grant.
Conditioned upon Your compliance
with Section 3.1 below and
subject to third party intellectual property claims,
the Initial
Developer hereby grants You a world-wide, royalty-free,
non-exclusive
license:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer, to use,
reproduce, modify, display,
perform, sublicense and
distribute the Original Software (or portions thereof),
with or without Modifications, and/or as part of a Larger
Work;"
So why
not, and I hereby invite any offended third parties to hassle Yahoo for my identity
so that they can pursue their bogus intellectual property claims.
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms
of the
* Common Development and Distribution License, Version 1.0 only
* (the
"License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
*
or http://www.opensolaris.org/os/licensing.
* See the License for the specific
language governing permissions
* and limitations under the License.
*
*
When distributing Covered Code, include this CDDL HEADER in each
* file and include
the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following
below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced
with your own identifying
* information: Portions Copyright [yyyy] [name of copyright
owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2000 Sun Microsystems,
Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights
Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
*
University Acknowledgment- Portions of this document are derived from
* software
developed by the University of California, Berkeley, and its
* contributors.
*/
#ifndef _SYS_ERRNO_H
#define _SYS_ERRNO_H
#pragma ident "@(#)errno.h
1.22 05/06/08 SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Error codes
*/
#define EPERM 1 /* Not super-user */
#define ENOENT
2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define
EINTR 4 /* interrupted system call */
#define EIO 5 /* I/O error */
#define
ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Arg list too long
*/
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number
*/
#define ECHILD 10 /* No children */
#define EAGAIN 11 /* Resource temporarily
unavailable */
#define ENOMEM 12 /* Not enough core */
#define EACCES 13 /*
Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15
/* Block device required */
#define EBUSY 16 /* Mount device busy */
#define
EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define
ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory
Message ID: 273785
Posted By: nobbutl
Posted On: 2005-06-14 19:53:00
Subject: Re: errno.h part II
#define EISDIR 21 /* Is a directory */
#define
EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* File table overflow */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Inappropriate
ioctl for device */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG
27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define
ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Math arg out of domain of func */
#define ERANGE 34 /* Math
result not representable */
#define ENOMSG 35 /* No message of desired type */
#define EIDRM 36 /* Identifier removed */
#define ECHRNG 37 /* Channel number
out of range */
#define EL2NSYNC 38 /* Level 2 not synchronized */
#define
EL3HLT 39 /* Level 3 halted */
#define EL3RST 40 /* Level 3 reset */
#define
ELNRNG 41 /* Link number out of range */
#define EUNATCH 42 /* Protocol driver
not attached */
#define ENOCSI 43 /* No CSI structure available */
#define
EL2HLT 44 /* Level 2 halted */
#define EDEADLK 45 /* Deadlock condition. */
#define ENOLCK 46 /* No record locks available. */
#define ECANCELED 47 /* Operation
canceled */
#define ENOTSUP 48 /* Operation not supported */
/* Filesystem
Quotas */
#define EDQUOT 49 /* Disc quota exceeded */
/* Convergent Error
Returns */
#define EBADE 50 /* invalid exchange */
#define EBADR 51 /* invalid
request descriptor */
#define EXFULL 52 /* exchange full */
#define ENOANO
53 /* no anode */
#define EBADRQC 54 /* invalid request code */
#define EBADSLT
55 /* invalid slot */
#define EDEADLOCK 56 /* file locking deadlock error */
#define EBFONT 57 /* bad font file fmt */
/* Interprocess Robust Locks
*/
#define EOWNERDEAD 58 /* process died with the lock */
#define ENOTRECOVERABLE
59 /* lock is not recoverable */
/* stream problems */
#define ENOSTR
60 /* Device not a stream */
#define ENODATA 61 /* no data (for no delay io)
*/
#define ETIME 62 /* timer expired */
#define ENOSR 63 /* out of streams
resources */
#define ENONET 64 /* Machine is not on the network */
#define
ENOPKG 65 /* Package not installed */
#define EREMOTE 66 /* The object is remote
*/
#define ENOLINK 67 /* the link has been severed */
#define EADV 68 /* advertise
error */
#define ESRMNT 69 /* srmount error */
#define ECOMM 70 /* Communication
error on send */
#define EPROTO 71 /* Protocol error */
[last chunk to
follow]
Message ID: 273786
Posted By: nobbutl
Posted On: 2005-06-14 19:55:00
Subject: Re: errno.h part III
/* Interprocess Robust Locks */
#define
ELOCKUNMAPPED 72 /* locked lock was unmapped */
#define ENOTACTIVE 73 /*
Facility is not active */
#define EMULTIHOP 74 /* multihop attempted */
#define
EBADMSG 77 /* trying to read unreadable message */
#define ENAMETOOLONG 78 /*
path name is too long */
#define EOVERFLOW 79 /* value too large to be stored
in data type */
#define ENOTUNIQ 80 /* given log. name not unique */
#define
EBADFD 81 /* f.d. invalid for this operation */
#define EREMCHG 82 /* Remote
address changed */
/* shared library problems */
#define ELIBACC 83 /*
Can't access a needed shared lib. */
#define ELIBBAD 84 /* Accessing a corrupted
shared lib. */
#define ELIBSCN 85 /* .lib section in a.out corrupted. */
#define
ELIBMAX 86 /* Attempting to link in too many libs. */
#define ELIBEXEC 87 /*
Attempting to exec a shared library. */
#define EILSEQ 88 /* Illegal byte sequence.
*/
#define ENOSYS 89 /* Unsupported file system operation */
#define ELOOP
90 /* Symbolic link loop */
#define ERESTART 91 /* Restartable system call */
#define ESTRPIPE 92 /* if pipe/FIFO, don't sleep in stream head */
#define ENOTEMPTY
93 /* directory not empty */
#define EUSERS 94 /* Too many users (for UFS) */
/* BSD Networking Software */
/* argument errors */
#define ENOTSOCK 95
/* Socket operation on non-socket */
#define EDESTADDRREQ 96 /* Destination address
required */
#define EMSGSIZE 97 /* Message too long */
#define EPROTOTYPE
98 /* Protocol wrong type for socket */
#define ENOPROTOOPT 99 /* Protocol not
available */
#define EPROTONOSUPPORT 120 /* Protocol not supported */
#define
ESOCKTNOSUPPORT 121 /* Socket type not supported */
#define EOPNOTSUPP 122 /*
Operation not supported on socket */
#define EPFNOSUPPORT 123 /* Protocol family
not supported */
#define EAFNOSUPPORT 124 /* Address family not supported by
*/
/* protocol family */
#define EADDRINUSE 125 /* Address already in use
*/
#define EADDRNOTAVAIL 126 /* Can't assign requested address */
/* operational
errors */
#define ENETDOWN 127 /* Network is down */
#define ENETUNREACH 128
/* Network is unreachable */
#define ENETRESET 129 /* Network dropped connection
because */
/* of reset */
#define ECONNABORTED 130 /* Software caused connection
abort */
#define ECONNRESET 131 /* Connection reset by peer */
#define ENOBUFS
132 /* No buffer space available */
#define EISCONN 133 /* Socket is already
connected */
#define ENOTCONN 134 /* Socket is not connected */
/* XENIX has
135 - 142 */
#define ESHUTDOWN 143 /* Can't send after socket shutdown */
#define ETOOMANYREFS 144 /* Too many references: can't splice */
#define ETIMEDOUT
145 /* Connection timed out */
#define ECONNREFUSED 146 /* Connection refused
*/
#define EHOSTDOWN 147 /* Host is down */
#define EHOSTUNREACH 148 /* No
route to host */
#define EWOULDBLOCK EAGAIN
#define EALREADY 149 /* operation
already in progress */
#define EINPROGRESS 150 /* operation now in progress */
/* SUN Network File System */
#define ESTALE 151 /* Stale NFS file handle
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_ERRNO_H */
---->8-------->8-------->8----
It just *had* to be done...
Message ID: 273792
Posted By: atul666
Posted On: 2005-06-14 20:29:00
Subject: Re: errno.h part III
Ok, so I decided to go and compare that errno.h
with the one that comes with stock (closed-source) Solaris 10 (SPARC)
It's
*mostly* identical. Someone went through the file and changed tab characters to
spaces, so in the original file the numeric values & comments for each error are
lined up nicely, and in the 'open' file they aren't. But maybe that's Yahoo's fault,
not Sun's. Either way, it's probably not important.
The interesting difference
is the comment at the top of the file. Here's the non-'open' version:
>>
/*
* Copyright (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_ERRNO_H
#define _SYS_ERRNO_H
#pragma ident "@(#)errno.h
1.20 00/01/12 SMI"
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
OF AT&T */
/* The copyright notice above does not evidence any */
/* actual
or intended publication of such source code. */
/*
* PROPRIETARY NOTICE
(Combined)
*
* This source code is unpublished proprietary information
* constituting, or derived under license from AT&T's Unix(r) System V.
* In addition,
portions of such source code were derived from Berkeley
* 4.3 BSD under license
from the Regents of the University of
* California.
*
*
*
* Copyright
Notice
*
* Notice of copyright on this source code product does not indicate
* publication.
*
* (c) 1986-2000 Sun Microsystems, Inc.
* (c) 1983,1984,1985,1986,1987,1988,1989
AT&T.
* All rights reserved.
*/
>>
The open version of the file
is 1.22, while the non-open is 1.20. Sun hasn't updated their own copyright notice,
since they haven't added anything to the file in the last 5 years. (This is actually
surprising given all the new features they added in Sol 9 & 10, but I digress.)
They left the old AT&T copyright notice on the file (note that it *starts*
in 1983, btw), and added a new, larger UC Berkeley copyright notice. The big scare
"unpublished & proprietary" notice is gone, poof. So Sun seems to believe they had
the right to remove that, at least. The old file also has a notice insisting that
the copyright notice doesn't constitute publication, which is also missing in the
new file. It's debatable whether removing the "unpublished" notice means that it's
now considered "published".
If it does, by the plain terms of the standard
Unix source license IBM now can't be held liable for "disclosing" the contents of
errno.h anymore, since it's been made public by a third party. Kewl.
Message ID: 273795
Posted By: atul666
Posted On: 2005-06-14 20:51:00
Subject: Re: errno.h part III
So then I decided to compare the Solaris stuff
with errno.h on my friendly neighborhood AIX 5 box.
I'm not going to post
the entire contents of the file, since a.) that would be pointless, and b.) it's
apparently not covered by that pesky AT&T Unix source agreement anyway. So Sun publishing
theirs doesn't mean IBM's is also "published". (Never mind the issue of whether
a simple name->number mapping like this is even copyrightable.)
The reason
I say AIX's file isn't covered by the AT&T agreement is the copyright notice on
the file doesn't mention AT&T anywhere:
/* @(#)49 1.27.1.23 src/bos/kernel/sys/errno.h,
incstd, bos510 1/25/01 16:31:11 */
/*
* COMPONENT_NAME: (INCSTD) Standard
Include Files
*
* FUNCTIONS:
*
* ORIGINS: 27,71
*
* (C) COPYRIGHT
International Business Machines Corp. 1985, 1996
* All Rights Reserved
* Licensed
Materials - Property of IBM
*
* US Government Users Restricted Rights - Use,
duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM
Corp.
*/
/*
* (c) Copyright 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION,
INC.
* ALL RIGHTS RESERVED
*/
Now, I remember that AIX (yes, even
5.x) is supposedly derived from OSF code, at least in part, but I hadn't realized
that their headers (or at least errno.h) came from there, and not AT&T. The whole
idea behind OSF was to create a (closed-source) Unix that contained no AT&T-derived
code, to avoid all the restrictions that come along with that, so I guess it shouldn't
be entirely surprising.
The file does credit BSD 4.3 Reno for ETOOMANYREFS,
although the numeric value given for it is actually different than on FreeBSD. The
file doesn't have a UCB notice, so they must've figured (correctly) that the symbol
by itself wasn't copyrightable.
So even if IBM *did* contribute anything
from their errno.h to Linux (which doesn't appear to be the case), it wasn't derived
from SCO-"owned" code to begin with, so Darl has no case.
But we knew *that*
already.
Message ID: 273796
Posted By: nobbutl
Posted On: 2005-06-14 20:51:00
Subject: Re: errno.h part III
*Fab* work there atul666, thanks (er, I don't
like calling you just plain Atul since you explained the derivation of your nym!)
<< They left the old AT&T copyright notice on the file (note that it *starts*
in 1983, btw), and added a new, larger UC Berkeley copyright notice. >>
...
which starts at 1982 :D
Message ID: 273799
Posted By: atul666
Posted On: 2005-06-14 21:16:00
Subject: Re: errno.h part III
I'm not quite at the point where I can put
together a family tree for errno.h, but here's another fun data point, from a Tru64
(a.k.a. OSF/1) v4.0 box. Here's the copyright notice on *its* errno.h:
/*
* *****************************************************************
* * *
* * Copyright (c) Digital Equipment Corporation, 1991, 1999 *
* * *
* * All
Rights Reserved. Unpublished rights reserved under *
* * the copyright laws of
the United States. *
* * *
* * The software contained on this media is proprietary
to *
* * and embodies the confidential technology of Digital *
* * Equipment
Corporation. Possession, use, duplication or *
* * dissemination of the software
and media is authorized only *
* * pursuant to a valid written license from Digital
Equipment *
* * Corporation. *
* * *
* * RESTRICTED RIGHTS LEGEND Use,
duplication, or disclosure *
* * by the U.S. Government is subject to restrictions
as set *
* * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, *
* *
or in FAR 52.227-19, as applicable. *
* * *
* *****************************************************************
*/
/*
* HISTORY
*/
/*
* @(#)$RCSfile: errno.h,v $ $Revision: 4.2.27.2
$ (DEC) $Date: 1997/06/24
15:56:56 $
*/
/*
* (c) Copyright 1990, 1991,
1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
* ALL RIGHTS RESERVED
*/
/*
* OSF/1 1.2
*/
/* @(#)errno.h 1.16 com/inc/sys,3.1,8943 10/23/89 18:36:36
*/
/*
* COMPONENT_NAME: errno.h
*
*
* Copyright International Business
Machines Corp. 1985, 1989
* All Rights Reserved
* Licensed Material - Property
of IBM
*
*/
So this sort of indicates that the OSF errno.h actually
originated at IBM, and was contributed by them when the OSF put their OS together
-- including the version owned by DEC (now HP).
The errno.h on HP-UX has
no copyright notice. The formatting's distinctive and has a lot of HP-UX-specific
comments. There is a comment toward the end that says "/* Attempt to match UnixWare
errnos where applicable */". It doesn't say the values were taken from UnixWare,
just that they're "attempting" to match the values, whatever that means.
Message ID: 273820
Posted By: atul666
Posted On: 2005-06-15 04:28:00
Subject: Re: errno.h part III
More data points...
* Tony Lawrence
has an article comparing errno.h on Linux & SCO Unix (=OpenServer) here: http://www.aplawrence.com/Unixart/errors.html
. He goes down the list and explains what each error means, making this a nice general
reference for a number of common errnos.
* A good article from 2003 on SCO's
header file claims, including a chunk about errno.h. And yes, I realize it's a SYS-CON
article. So read it, or not, it's entirely up to you.
http://linux.sys-con.com/read/39051.htm
* Here is Berkeley errno.h version 7.13, dated 2/19/1991:
http://healconsulting.com/SCO/cmp/net2/sys/sys/errno.h.txt
.
A FreeBSD errno.h from 2002, based on Berkeley errno.h v8.5: http://freebsd.active-venture.com/FreeBSD-srctree/newsrc/sys/errno.h.html
Errno.h on Mac OSX 10.3 is also based on Berkeley v8.5, and is *very* similar;
the defines are identical down to about position 80. After that, the remaining FreeBSD
errnos are shuffled around a little, and a handful of OSX-specific errnos are added,
including my all-time favorite, EBADMACHO, which (sadly) merely indicates an invalid
Mach-O binary file.
The relevant bits from the OSX header:
* Copyright
(c) 2000-2002 Apple Computer, Inc. All rights reserved.
... standard APSL
license boilerplate ...
/* Copyright (c) 1995 NeXT Computer, Inc. All Rights
Reserved */
* Copyright (c) 1982, 1986, 1989, 1993
* The Regents of the
University of California.
The FreeBSD and OSX files both contain USL boilerplate
that was inserted in a lot of BSD source files as part of the BSD v. USL settlement,
even though it's doubtful that there's actually anything USL-owned here or elsewhere
in the BSD codebase. Even if there is, it's still covered by the BSD license, so
it's of no use whatsoever to SCO. Anything in post-USL BSD headers is there with
the USL seal of approval, and anything those files have in common with Sun's headers
has been legally "disclosed" at least twice now. Not that it'll make a difference
to Darl or anything, but it'll make a difference in the courtroom, certainly.
* Also, here's errno.h from Plan 9, which has its roots in AT&T's "Research
Unix" line.
http://icims.csl.uiuc.edu/~lheal/doc/Linux/SCO/Plan9-include.html#errno.h.
It doesn't give much in the way of useful file history, just a "Copyright © 2002
Lucent Technologies Inc.".
The texts of these Yahoo Message Board posts have been licensed for copying and distribution by the Yahoo Message Board users "nobbutl", "atul666" under the following license: License: CCL Attribution-NonCommercial-ShareAlike v2.0.
Copyright 2005 Yahoo! SCOX. Messages are owned by the individual posters.