top, vmstat, who, rwhod - Use CLOCK_UPTIME to calculate uptime* Use CLOCK_UPTIME to calculate the system uptime instead of subtracting current real time from boot real time, which could get muf
top, vmstat, who, rwhod - Use CLOCK_UPTIME to calculate uptime* Use CLOCK_UPTIME to calculate the system uptime instead of subtracting current real time from boot real time, which could get muffed up by setting the time.
show more ...
rwhod(8): Fix a for() loop that was incrementing twice.
rwhod(8): Fix -Wundef.
Adjust numerous manual pages, scripts and Makefiles for the utmp removal.Also remove /var/run/utmp and /var/log/lastlog via 'make upgrade'. Keepany /var/log/wtmp and /var/log/wtmp.* files in case
Adjust numerous manual pages, scripts and Makefiles for the utmp removal.Also remove /var/run/utmp and /var/log/lastlog via 'make upgrade'. Keepany /var/log/wtmp and /var/log/wtmp.* files in case the user wants toconvert them with wtmpcvt(1).
rwhod(8): Add utmpx support from FreeBSD. Drop utmp support.
Replace local array size calculations with NELEM().
Add __attribute__((__noreturn__)) to various function prototypes in usr.sbin/.This general cleanup is useful in various ways. It helps the compileroptimize better and it also helps later GCCs dete
Add __attribute__((__noreturn__)) to various function prototypes in usr.sbin/.This general cleanup is useful in various ways. It helps the compileroptimize better and it also helps later GCCs detect better when to give-Wimplicit-fallthrough warnings and when not.Found-with: -Wsuggest-attribute=noreturn
rwhod(8): Staticize.
rwhod(8): Fix the warning and raise WARNS back up to 6.'next' is only initialized and referenced (in separate if()'s) when'quiet_mode' is not set. Unfortunately gcc does not realize this andwarns
rwhod(8): Fix the warning and raise WARNS back up to 6.'next' is only initialized and referenced (in separate if()'s) when'quiet_mode' is not set. Unfortunately gcc does not realize this andwarns about 'next' being maybe uninitialized.Fix this by initializing 'next', with no functional change.
rwhod(8): Lower WARNS to 2 (masks -Wmaybe-uninitialized)
Use system's RT_ROUNDUP and RT_ADVANCE macros instead of local copies.Reviewed-by: dillon
libutil: Various updates from FreeBSD, esp. pid_* functionsIt appears that libutil.so is another Frankenstein monster where halfof it came from FreeBSD and later it was updated with NetBSD functio
libutil: Various updates from FreeBSD, esp. pid_* functionsIt appears that libutil.so is another Frankenstein monster where halfof 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_* functionshad to be brought in from FreeBSD. While doing that, I synced withFreeBSD as much as possible. The expand number function was addedas 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 onesrequire syscntls, so I left the NetBSD versions alone. The varioushumanize 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
Correct BSD License clause numbering from 1-2-4 to 1-2-3.Apparently everyone's doing it:http://svnweb.freebsd.org/base?view=revision&revision=251069Submitted-by: "Eitan Adler" <lists at eitanadl
Correct BSD License clause numbering from 1-2-4 to 1-2-3.Apparently everyone's doing it:http://svnweb.freebsd.org/base?view=revision&revision=251069Submitted-by: "Eitan Adler" <lists at eitanadler.com>
Remove advertising header from man pages.By: Eitan Adler <lists@eitanadler.com>
Remove advertising header from all userland binaries.From: Eitan Adler <lists@eitanadler.com>
rwhod(8): Prevent clobbering the neighboring field by a wrong cast.The time stamps in the rwhod(8) network datagram and, based on that,/var/rwho/whod.* spool files are typed as 32bit int and canno
rwhod(8): Prevent clobbering the neighboring field by a wrong cast.The time stamps in the rwhod(8) network datagram and, based on that,/var/rwho/whod.* spool files are typed as 32bit int and cannot accepta 64bit time_t.The old code clobbered the first bytes of the adjacent "hostname"field, yielding empty hostnames in local rwho(1) and ruptime(1) output.(Outgoing datagrams to other hosts were not affected.)Re-code to let the compiler do the proper coercion (well, until 2038).Submitted-by: Martin NeitzelDragonfly-bug: <https://bugs.dragonflybsd.org/issues/2339>
Put WARNS?=6 in usr.sbin/Makefile.inc (like in usr.bin/ etc.).Raise WARNS as high as possible for the utilities that still warnwith 6.
Rename /kernel and /module to /boot/kernel and /boot/module where appropriate.
Pass NULL instead of getprogname() to pidfile(). pidfile() will automaticallydetect if the option is NULL and insert the appropriate basename.
Sweep-fix man page section order to match mdoc(7), part 5/5.Note: I haven't touched the few man pages that are still using the old man(7) macros. They will be converted to mdoc later.
- State default
Remove trailing blank space characters. mdoc(7) explicitly recommends doingso lest troff might get confused.
- Whoops, some test code slipped in. Remove it
- Introduce new -g option. This allows for the broadcast time to be reducedbelow 3 minutes, but no higher due to a three minute downtime assumption.- When polling, use .events (noted by Peter @ Ne
- Introduce new -g option. This allows for the broadcast time to be reducedbelow 3 minutes, but no higher due to a three minute downtime assumption.- When polling, use .events (noted by Peter @ NetBSD)Ok: JoergDiscussed with: sjg
- Make rwhod now use poll(2) instead of signalsIf anyone can test this further than me, please do!Taken from: OpenBSD with my timing modificationsReviewed by: Joerg@
12