diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2024-08-14 13:54:09 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2024-08-14 13:54:09 +0000 |
commit | 69aebde5247a8fcd4c1bc9455d5333d9179fb1b1 (patch) | |
tree | e1837bd694255d8aa4c90a901eafeda3712cdda1 /sbin/fdisk/part.c | |
parent | 4839017b5e7753c702961215d8ef057abb4c04ef (diff) |
Make sysctl_int() and sysctl_int_lower() mp-safe and unlock KERN_HOSTID.
The only difference between sysctl_int() and sysctl_int_bounded()
is the range check, so sysctl_int() is just sysctl_int_bounded(...,
INT_MIN, INT_MAX). sysctl_int() is not the fast path, so this useless
check is not significant.
Mp-safe sysctl_int() is meaningless for sysctl_int_lower(), so rework it
in the sysctl_int_bounded() style. This time all affected paths are
kernel locked, but this doesn't make sysctl_int_lower() worse.
Change `hostid' type to the type of int. It only stored but never used
within kernel, userland accesses it through sysctl_int(). Nothing
changes, but variable becomes consistent with sysctl_int().
ok bluhm
Diffstat (limited to 'sbin/fdisk/part.c')
0 files changed, 0 insertions, 0 deletions