History log of /netbsd-current/include/util.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.69 10-Apr-2016 roy

Implement pidfile_lock, pidfile_read and pidfile_clean.

Discussed on tech-net@, ok core@.


# 1.68 24-Sep-2015 christos

add kinfo_getvmmap() decl


# 1.67 26-Jul-2015 kamil

Add ereallocarr(3) to libutil

ereallocarr(3) wraps reallocarr(3) and embeds return status validation.

Older version reviewed by <riastradh> and <christos>


# 1.66 18-Jan-2015 christos

add estrto{i,u} (Kamil Rytarowski)


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base tls-maxphys-base
# 1.65 02-May-2013 matt

Add getbyteorder(void) prototype.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.64 04-Nov-2012 christos

Over the years this header gained a lot of disparate functionality
and willy nilly people kept adding headers appropriate to the new
functionality So we reached where we are today, this header causes
lots of namespace conflicts (for example you cannot use util.h from
a lex file, because ECHO is macro used in lex, and ECHO is defined
to 8 in termios). Roll back time, and remove all the unnecessary
includes, leaving it to the program to include the ancillary headers
they need.


Revision tags: yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.63 07-Apr-2012 christos

branches: 1.63.2;
add getdisk{raw,cooked}name


# 1.62 07-Apr-2012 christos

add getfsspecname


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.61 07-Jan-2012 christos

strspct


# 1.60 13-Nov-2011 christos

getfstypename addition


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.59 30-Aug-2011 bouyer

branches: 1.59.2;
Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.


# 1.58 28-Aug-2011 christos

prototype for strpct


# 1.57 26-Aug-2011 joerg

pw_error is documented to be dead


# 1.56 17-Jul-2011 joerg

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 uebayasi-xip-base2 uebayasi-xip-base1
# 1.55 25-Feb-2010 joerg

Consistently use __printflike and __scanflike.


Revision tags: uebayasi-xip-base
# 1.54 27-Jan-2010 drochner

branches: 1.54.2;
retire pw_policy(3) -- it is not found useful, there are other
(more common) ways to enforce a password strength policy
approved by elad


Revision tags: matt-premerge-20091211
# 1.53 13-Oct-2009 pooka

In a furious blaze of *facepalm* / "what was i thinking?", fix the
open routine function pointer prototype of opendisk1() to match
the prototype of open().


# 1.52 08-Sep-2009 pooka

Add opendisk1(), which functions like opendisk(), but takes a function
pointer to the routine to be used for open().


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.51 13-May-2009 pgoyette

Implement snprintb_m(3) to provide multi-line bit/bit-field decode.
Discussed on tech-kern.


# 1.50 11-Jan-2009 christos

branches: 1.50.2;
merge christos-time_t


Revision tags: netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.49 14-Dec-2007 christos

branches: 1.49.12; 1.49.14; 1.49.18;
humanize_number was the only function in <util.h> that is not in libutil.
Move it to stdlib.h and add dehumanize_number.


Revision tags: cube-autoconf-base matt-armv6-base
# 1.48 30-Oct-2007 christos

don't use u_long because it is present only with _NETBSD_SOURCE


# 1.47 25-Sep-2007 lukem

Add raise_default_signal(3) -- raise the default signal handler.
Can be used by applications that have their own SIGINT (et al)
handlers and want to exit in a manner that correctly
signals to the parent that the process was terminated by a signal.
See http://www.cons.org/cracauer/sigint.html for more info.
Discussed on tech-userlevel@.


Revision tags: matt-mips64-base
# 1.46 01-Jul-2007 pooka

branches: 1.46.4;
add estrndup()


# 1.45 14-Dec-2006 christos

moved string_to_flags and flags_to_string from ls to libutil.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
# 1.44 20-Nov-2006 christos

getdate -> parsedate


# 1.43 17-Nov-2006 christos

constify getdate


# 1.42 17-Nov-2006 christos

add getdate.


# 1.41 26-Aug-2006 christos

Add efun(3)


Revision tags: abandoned-netbsd-4-base
# 1.40 18-Feb-2006 elad

Don't expose struct pw_policy and use pw_policy_t, use malloc, man-page
fixups.

As discussed on source-changes@.

Okay yamt@, thorpej@.


# 1.39 18-Feb-2006 elad

Add the struct pw_policy forgotten in previous commit.


# 1.38 14-Sep-2005 elad

Forgot these when imported pw_policy(3).
Thanks to Hisashi T Fujinaka for noticing.


# 1.37 27-Aug-2005 uwe

Get rid of the #if !HAVE_NBTOOL_CONFIG_H kludge. None of host tools
uses this header now.


# 1.36 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.35 15-May-2005 thorpej

u_short -> uint16_t


Revision tags: netbsd-3-base
# 1.34 12-Jan-2005 christos

branches: 1.34.2;
add pw_getpwconf()


# 1.33 19-Nov-2004 christos

Add sockaddr_snprintf()


# 1.32 03-Aug-2004 thorpej

- Rename pw_copy() to pw_copyx(), make it return a success/failure code,
and add "errbuf" and "errbufsz" parameters so that errors can be handled
gracefully, rather than simply exiting the process.
- Add a pw_copy() wrapper around pw_copyx() to preserve old behavior for
apps that use it.
- Bump shlib version to 7.4.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.31 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22270, verified by myself.


# 1.30 24-Jan-2003 fvdl

Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.29 12-Dec-2002 scw

Add getlabelsector() and getlabeloffset() as wrappers around the
KERN_LABELSECTOR and KERN_LABELOFFSET sysctls.


# 1.28 30-Nov-2002 lukem

- Migrate fparseln(3) from libutil to libc, where it should have been in
the first place...
- Bump libutil major (to 7.0) and libc minor (to 12.91).


# 1.27 12-Oct-2002 elric

add prototypes for disklabel_dkcksum() and disklabel_scan().


# 1.26 20-Sep-2002 christos

Add snprintb(3)


# 1.25 15-Aug-2002 enami

Cosmetic changes.


# 1.24 08-Aug-2002 abs

Add humanize_number.3 from Tomas Svensson in PR lib/15508.
Bump version of libutil


# 1.23 27-Jul-2002 christos

add utmpx/wtmpx processing routines


# 1.22 22-May-2002 itojun

change return type of pidfile(3) to int (-1 on error), to inform caller
of errors. behavior now in sync with openbsd implementation.
(see tech-userlevel and bsd-api-discuss)


Revision tags: netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.21 18-Aug-2001 ad

branches: 1.21.2;
Add two arguments to pw_mkdb(), a la OpenBSD. This is to allow us to pass
the -u and -s options to pwd_mkdb.


# 1.20 06-Apr-2001 wiz

add getbootfile(3)


# 1.19 06-Dec-2000 tron

branches: 1.19.2;
Add two new passwd file update functions:
- The pw_setprefix() function defines the root directory used for passwd
file updates. If the prefix is set to /newroot pw_lock() will operate on
/newroot/etc/ptmp afterwards. The default prefix is an empty string.
- The pw_getprefix() function returns the root directory which is currently
used for passwd file updates.


# 1.18 18-Sep-2000 ad

- Sort function decls.
- Remove duplicate decl.
- First arg to secure_path() is now constant.


# 1.17 07-Jul-2000 ad

Remove decl for parseuserspec(), a local modification which acidentally got
comitted.


# 1.16 06-Jul-2000 ad

- Declare pw_getconf().
- ANSIfy.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.15 12-Jan-2000 mjl

branches: 1.15.4;
Add necessary support routines for login.conf.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.14 12-Jun-1999 christos

- provide forward struct declarations for all functions.
- const poison login().
- XXX: we should not include all these files here. We only need stdio.h and
sys/types.h! But I am not rm'ing them now because too many things will break.


# 1.13 06-Jun-1999 thorpej

Add pidfile(3), which write a pid file in /var/run, and arranges for it
to be removed on normal exit.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.12 26-Jul-1998 mycroft

const poisoning.


# 1.11 08-Jun-1998 lukem

move pw_scan from util.h to pwd.h, add _PASSWORD_{OLDFMT,NOWARN} flags


# 1.10 01-Dec-1997 lukem

add flags arg to fparseln(), and define FPARSELN_UNESC{ESC,CONT,COMM,REST,ALL}


# 1.9 16-Nov-1997 lukem

fix retval of fparseln


# 1.8 16-Nov-1997 christos

Add fparseln(3)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.7 11-Oct-1997 cjs

Add prototypes and defines for pidlock/ttylock/ttyunlock.


# 1.6 25-Sep-1997 lukem

implement opendisk(3), as discussed with Jason Thorpe


# 1.5 24-Jul-1997 phil

Update pw_copy prototype for changes for PR3806, 3807.


# 1.4 30-Jun-1997 christos

forgot to commit this.


# 1.3 14-Nov-1996 gwr

Add declaration for ttyaction().


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.2 16-May-1996 thorpej

Prototypes for getmaxpartitions(3) and getrawpartition(3).


# 1.1 15-May-1996 jtc

Added new header files for functions in libutil.
Added macro for master passwd lock file.
From Greg Hudson <ghudson@MIT.EDU>.