#
d7259957 |
| 04-Dec-2022 |
cheloha <cheloha@openbsd.org> |
userspace: remove vestigial '?' cases from top-level getopt(3) loops
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument.
userspace: remove vestigial '?' cases from top-level getopt(3) loops
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines.
Prompted by dlg@. With help from dlg@ and millert@.
Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2
ok naddy@ millert@ dlg@
show more ...
|
#
4ec73a12 |
| 22-Feb-2022 |
deraadt <deraadt@openbsd.org> |
MAXCOMLEN is no longer needed in these programs, so remove the annotation from sys/param.h include lines, or remove the include lines entirely if it this was the least requirement. ok millert
|
#
3aaa63eb |
| 28-Jun-2019 |
deraadt <deraadt@openbsd.org> |
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
show more ...
|
#
b50bd522 |
| 18-Dec-2017 |
cheloha <cheloha@openbsd.org> |
Add the CLOCK_BOOTTIME clockid for use with clock_gettime(2) and put it to use in userspace in lieu of the kern.boottime sysctl.
Its absolute value is the time that has elapsed since the system boot
Add the CLOCK_BOOTTIME clockid for use with clock_gettime(2) and put it to use in userspace in lieu of the kern.boottime sysctl.
Its absolute value is the time that has elapsed since the system booted, i.e., the system uptime.
Use in top(1), w(1), and snmpd(8) eliminates a race with settimeofday(2), adjtime(2), etc. inherent to deriving the system uptime via the kern.boottime sysctl.
Product of a great deal of discussion/revision with jca@, tb@, and guenther@.
ok tb@ jca@ guenther@ dlg@ mlarkin@ tom@
show more ...
|
#
6b78bc15 |
| 14-Dec-2017 |
jasper <jasper@openbsd.org> |
when -h is passed don't print any header, as is common practise in other systems too. adjust uptime.1 while here as pointed out by martijn@
ok tb@ jca@ martijn@
|
#
782e799d |
| 27-Jul-2017 |
jca <jca@openbsd.org> |
kp can be NULL (eg, stale utmp entry), so adjust the comment.
Prompted by another diff from Klemens Nanni
|
#
1c0a80cb |
| 30-May-2017 |
schwarze <schwarze@openbsd.org> |
stop reacharound from w(1) to ps(1); no functional change; diff from bcallah@; OK tedu@ deraadt@
|
#
d4442920 |
| 19-Mar-2016 |
deraadt <deraadt@openbsd.org> |
if -a is specified, allow "dns" in pledge requests. problem noticed by Raf Czlonka
|
#
4120813f |
| 23-Oct-2015 |
deraadt <deraadt@openbsd.org> |
With new pledge "ps" and "vminfo" requests, ps/top/w become possible.
|
#
82c91bec |
| 31-Aug-2015 |
deraadt <deraadt@openbsd.org> |
calculate screen size way earlier, this will provide some opportunities for taming the string manipulation in the later half of the program.
|
#
f7055df5 |
| 15-Mar-2015 |
millert <millert@openbsd.org> |
tzfile.h is an internal header that should never have been installed. What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes
tzfile.h is an internal header that should never have been installed. What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
show more ...
|
#
b9fc9a72 |
| 16-Jan-2015 |
deraadt <deraadt@openbsd.org> |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_N
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
show more ...
|
#
442294dd |
| 08-Jul-2014 |
deraadt <deraadt@openbsd.org> |
Cannot find a reason for this to need machine/cpu.h
|
#
644b4788 |
| 04-Jul-2014 |
guenther <guenther@openbsd.org> |
Track whether a process is a zombie or not yet fully built via flags PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's thread data. This eliminates the need for the thread-leve
Track whether a process is a zombie or not yet fully built via flags PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's thread data. This eliminates the need for the thread-level SDEAD state.
Change kvm_getprocs() (both the sysctl() and kvm backends) to report the "most active" scheduler state for the process's threads.
tweaks kettenis@ feedback and ok matthew@
show more ...
|
#
1b878602 |
| 20-Nov-2013 |
deraadt <deraadt@openbsd.org> |
str derives from argv; so use an unsigned char cast for isspace() ok ratchov
|
#
6f288e37 |
| 31-Oct-2013 |
deraadt <deraadt@openbsd.org> |
sometimes we find .h we no longer need
|
#
82ff3630 |
| 22-Aug-2013 |
guenther <guenther@openbsd.org> |
Correct format string mismatches turned up by -Wformat=2
suggestions and ok millert@
|
#
27a43f4d |
| 24-Jun-2012 |
guenther <guenther@openbsd.org> |
Fix comment. Pointed out by Seth Wright (seth at crosse.org)
|
#
41763857 |
| 28-Jul-2011 |
kettenis <kettenis@openbsd.org> |
Adjust for machdep.consdev -> kern.consdev sysctl change. This should restore the functionality to figure out the real console device when /dev/console is used.
ok millert@, deraadt@
|
#
5d5a592e |
| 26-Apr-2011 |
jasper <jasper@openbsd.org> |
tyop in comment
|
#
5027561d |
| 10-Apr-2011 |
guenther <guenther@openbsd.org> |
Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc now that we've got name we want for the API we want
"ZAP!" deraadt@
|
#
043fbe51 |
| 27-Oct-2009 |
deraadt <deraadt@openbsd.org> |
rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (th
rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
show more ...
|
#
6bdea217 |
| 30-Sep-2008 |
millert <millert@openbsd.org> |
Properly display files with embedded colons being xferred via ftd. Closes PR 5119. OK miod@
|
#
305cdd40 |
| 20-Jul-2005 |
jaredy <jaredy@openbsd.org> |
remove the -M and -N flags to uptime, they do nothing. w(1) is unaffected by this.
closes PR#4298
ok millert, deraadt
|
#
96de7668 |
| 11-Apr-2005 |
deraadt <deraadt@openbsd.org> |
spacing
|