Remove the legacy "utmp" API, now that our utils have been moved to utmpx. As I wrote in UPGRADING, the main change for "normal" users is probably that /var/log/wtmp is no longer logged to, just /var/log/wtmpx. Leave the old API in libc as compat symbols that do nothing and always succeed for the run-time linker (i.e. old binaries still using them). dports has been kindly adjusted by zrj and new binary packages for master are on their way. A future commit will provide a wtmpcvt(1) utility to convert old wtmp files to the wtmpx format.
libutil - Add HN_FRACTIONAL to humanize_number() * Add HN_FRACTIONAL to humanize_number(). This is an expanded HN_DECIMAL mode. Up to two additional fractional digits will be displayed if they would fit in the buffer. Fractional digits are not displayed for small numbers (less than 1000 or less than 1024 depending on the mode).
libutil: Various updates from FreeBSD, esp. pid_* functions It appears that libutil.so is another Frankenstein monster where half of it came from FreeBSD and later it was updated with NetBSD functions. Like libm, this causes problems with syncing later. In order to update the daemon program, the set of pidfile_* functions had to be brought in from FreeBSD. While doing that, I synced with FreeBSD as much as possible. The expand number function was added as well as a dedicated pw_util man page. Specifically ignored were FreeBSD functionality involving kinfo and kld. The login functions are essentially incompatible as the FreeBSD ones require syscntls, so I left the NetBSD versions alone. The various humanize functions that only exist on DragonFly were also left untouched. Collateral damage included: sbin/devd/devd.[ch][ch] (partial sync) usr.sbin/authpf/authpf.c (partial sync) usr.sbin/apmd/apmd.c usr.sbin/battd/battd.c usr.sbin/bthcid/bthcid.c usr.sbin/pflogd/pflogd.c usr.sbin/rwhod/rwhod.c usr.sbin/syslogd/ (full sync) usr.sbin/sysvipcd/sysvipcd.c
utmpx - Bring in utmpx,wtmpx and lastlogx support * This commit introduces the necessary support for utmpx, wtmpx and lastlogx, as well as updating many base utils to work with these while mostly maintaining compatibility with the old utmp, wtmp and lastlog. * The new last(1) supports wtmpx but defaults to wtmp as not all wtmp writers have been updated for wtmpx. * All utmp readers support both utmp and utmpx now. * lastlogin (the only lastlog reader) supports both lastlog and lastlogx. * The utils who(1) and finger have been almost directly replaced by their NetBSD equivalent. In case of who(1) the only custom modification is the behaviour of '-b' to be as it has always been. * Partially-Obtained-from: NetBSD
DEVTAB - Add mountroot & fstab support for serial numbers, and devtab. * The vfs.root.mountfrom /boot/loader.conf variable may now specify devfs aliases, allowing it to specify root mounts by serial number. Here is an example: vfs.root.mountfrom="hammer:serno/L41JYE0G.s1d" Note that vfs.root.mountfrom may NOT currently specify /etc/devtab labels. * /etc/fstab may now specify devfs relative paths (such as serial numbers) as well as /etc/devtab labels. A ".suffix" may be used to extend the translation so /etc/devtab only needs to specify the base label. Example /etc/fstab: # Device Mountpoint FStype Options Dump Pass # driveA.s1d / hammer rw 1 1 driveA.s1b none swap sw 0 0 driveA.s1a /boot ufs rw 1 1 serno/L41JYE0G.s1d /fubar hammer rw 1 1 /etc/devtab: driveA serno L41JYE0G
libutil - add getdevpath() Add the getdevpath() function which translates a device name such as "da0", or label such as "fubar", into a device path. This function searches /usr/local/etc/devtab, /etc/devtab, and /etc/defaults/devtab for labels. Device names beginning with '/' or '.' are assumed to be paths and passed through.