Home | History | Annotate | Download | only in gen
History log of /src/lib/libc/gen/disklabel.c
RevisionDateAuthorComments
 1.37  25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.36  20-Mar-2012  matt Use C89 definitions.
Remove use of __P
 1.35  13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.34  19-Mar-2006  christos branches: 1.34.44;
Coverity CID 512: Fix memory leak.
 1.33  22-Jun-2005  he Fix the toolification of disklabel by using the nbinclude namespace
under HAVE_NBTOOL_CONFIG_H for disktab.h as well. This means
disktab.h has to be installed in the nbinclude include directory.

(Failure mode: with TOOLDIR as a subdirectory of /usr, the host's disktab.h
got picked up, and not the in-tree copy.)

Reviewed by dyoung.
 1.32  12-Jun-2005  dyoung Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
 1.31  23-Apr-2004  christos adjust to constification.
 1.30  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.29  02-Apr-2003  fvdl Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
 1.28  11-Nov-2002  thorpej Fix signed/unsigned comparison warnings.
 1.27  07-Jul-2000  itohy branches: 1.27.2;
Passing "char" values to ctype(3) functions is problematic.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.

The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems. On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems. However, we leave the isascii()
untouched for now, so as not to change the current behavior.
 1.26  22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.25  20-Sep-1999  lukem branches: 1.25.4;
back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.24  16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.23  19-Jan-1999  abs Add '-f disktab' option to disklabel, via lib/6623 from
Greg A. Woods <woods@most.weird.com>. (Very) slightly tweaked disklabel.8
 1.22  12-Nov-1998  christos delint
 1.21  10-Aug-1998  perry bzero->memset, bcopy->memcpy, bcmp->memcmp
 1.20  26-Jul-1998  mycroft const poisoning.
 1.19  28-Feb-1998  enami Just nuke the cast rather than changing (char *) to (void *). Even lint
doesn't complain about it.
 1.18  26-Feb-1998  perry trivial changes to reduce lint complaints
 1.17  03-Feb-1998  perry remove obsolete register declarations
 1.16  02-Feb-1998  perry merge/update to lite-2
 1.15  21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.14  13-Jul-1997  christos Fix RCSID's
#if 0 a local unused error function
 1.13  14-Feb-1997  scottr getdiskbyname() was broken by previous change, adversely affecting
newfs(8) and disklabel(8). Back this out, and note instead that all
instances of strcpy() here are safe.
 1.12  23-Jan-1997  mrg - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
 1.11  07-Jun-1995  cgd branches: 1.11.4;
eliminate the need for some (fatal) casts.
 1.10  13-May-1995  jtc #include appropriate header files to bring prototypes into scope
 1.9  27-Feb-1995  cgd make lint/SCCS Id if more standard.
 1.8  25-Feb-1995  cgd typo
 1.7  25-Feb-1995  cgd update to 4.4-Lite and/or clean up Id
 1.6  19-Oct-1994  cgd branches: 1.6.2;
pointer type.
 1.5  12-Jun-1994  cgd fix up includes for new FS code
 1.4  11-Nov-1993  jtc First pass at getting a clean compile with "gcc -Wall", mostly explictly
declaring function return values, etc.
 1.3  26-Aug-1993  jtc Declare rcsid strings so they are stored in text segment.
 1.2  30-Jul-1993  mycroft Add even more RCS frobs.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3  02-Feb-1998  perry import lite-2
 1.1.1.2  25-Feb-1995  cgd from lite, with minor name rearrangement to fit.
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.2.1  02-May-1995  jtc #include "namespace.h"
 1.11.4.2  20-Sep-1996  jtc snapshot namespace cleanup: net, etc.
 1.11.4.1  19-Sep-1996  jtc snapshot namespace cleanup: gen
 1.25.4.1  27-Dec-1999  wrstuden DEV_BSIZE -> DEF_BSIZE.
 1.27.2.1  11-Nov-2002  nathanw Catch up to -current
 1.34.44.2  30-Oct-2012  yamt sync with head
 1.34.44.1  17-Apr-2012  yamt sync with head

RSS XML Feed