Sascha Wildner [Sat, 6 Feb 2021 17:02:40 +0000 (18:02 +0100)]
tic: Fix wrong path in the Makefile.
It doesn't change the contents of term.h, though.
Sascha Wildner [Sat, 6 Feb 2021 15:31:21 +0000 (16:31 +0100)]
libkinfo/Makefile: Oops, fix typo in the MLINKS.
Sascha Wildner [Sat, 6 Feb 2021 07:24:30 +0000 (08:24 +0100)]
Use %U for URIs within reference blocks in various manual pages.
Sascha Wildner [Fri, 5 Feb 2021 05:31:53 +0000 (06:31 +0100)]
kinfo.3: Mention cputime_pcpu_statistics() and route_pcpu_statistics().
Antonio Huete Jimenez [Fri, 5 Feb 2021 00:30:12 +0000 (01:30 +0100)]
libaura: Limit device/mount point comparison to PATH_MAX
Antonio Huete Jimenez [Fri, 5 Feb 2021 00:07:59 +0000 (01:07 +0100)]
libaura: Restore local variable name 'args'.
- For consistency's sake across the tree where 'args' or 'ap'
are widely used.
Antonio Huete Jimenez [Fri, 5 Feb 2021 00:05:21 +0000 (01:05 +0100)]
libaura: Restore fspred CVD Id.
- It is still important for some people.
Antonio Huete Jimenez [Thu, 4 Feb 2021 09:15:24 +0000 (10:15 +0100)]
libaura: Remove unused variable
Reported-by: daftaupe
Antonio Huete Jimenez [Thu, 4 Feb 2021 00:14:30 +0000 (01:14 +0100)]
libaura: Several fixes to fs predicates
- Make is_program() a bit more precise.
- Fix is_device()
- Simplify the code a bit.
- Regression tests now pass.
Test case Result
--------------------------------------------------------------------------------
usr.sbin/installer/libaura/dict1/dict1 PASS
usr.sbin/installer/libaura/dict2/dict2 PASS
usr.sbin/installer/libaura/dict3/dict3 PASS
usr.sbin/installer/libaura/fspred1/fspred1 PASS
Antonio Huete Jimenez [Thu, 4 Feb 2021 00:12:29 +0000 (01:12 +0100)]
libaura: Fix fspred test
Sascha Wildner [Tue, 2 Feb 2021 11:45:57 +0000 (12:45 +0100)]
kernel/bpf: Put a struct declaration (netmsg_bpf_output) into the NBPF check.
Sascha Wildner [Tue, 2 Feb 2021 11:44:11 +0000 (12:44 +0100)]
kernel/rtsock: Remove no longer needed ns_count in struct route_cb.
This is a leftover from the XEROX Network Systems (NS) protocol removal
(
62b5ec1d702a90f4c4f06347b3ad258a29ff8929 and later commits).
Sascha Wildner [Tue, 2 Feb 2021 11:41:30 +0000 (12:41 +0100)]
kernel: Remove two unused declarations.
Antonio Huete Jimenez [Mon, 1 Feb 2021 01:16:44 +0000 (02:16 +0100)]
regression: Initial runlist for the regression tests
Antonio Huete Jimenez [Mon, 1 Feb 2021 01:15:40 +0000 (02:15 +0100)]
libaura: Regression test for fspred
Antonio Huete Jimenez [Mon, 1 Feb 2021 01:11:04 +0000 (02:11 +0100)]
regression: Force rm to avoid dfregress to hang in stdin
Antonio Huete Jimenez [Mon, 1 Feb 2021 00:52:08 +0000 (01:52 +0100)]
dsynth: Add extra information to the build output
- Sort of bring what marino's synth used to output before
starting the build of a port. Environment, some make
variables and /etc/make.conf
Antonio Huete Jimenez [Mon, 1 Feb 2021 00:02:29 +0000 (01:02 +0100)]
dsynth: Warn the user about world/kernel being out of sync
Antonio Huete Jimenez [Sun, 31 Jan 2021 17:51:00 +0000 (18:51 +0100)]
dsynth: Set OPSYS according to the detection or profile config
Sascha Wildner [Sun, 31 Jan 2021 08:36:13 +0000 (09:36 +0100)]
kernel: Fix two typos in comments.
Sascha Wildner [Sat, 30 Jan 2021 19:06:21 +0000 (20:06 +0100)]
Sync zoneinfo database with tzdata2021a from ftp://ftp.iana.org/tz/releases
* South Sudan changes from +03 to +02 on 2021-02-01 at 00:00.
* Also update leap second info.
For a detailed list of changes, see share/zoneinfo/NEWS.
Tomohiro Kusumi [Sat, 30 Jan 2021 17:31:46 +0000 (02:31 +0900)]
sbin/hammer2: Fix compilation on Linux
Sascha Wildner [Fri, 29 Jan 2021 20:33:50 +0000 (21:33 +0100)]
kernel: Move the flags for kern_dup() to <sys/filedesc.h>.
Sascha Wildner [Fri, 29 Jan 2021 11:28:47 +0000 (12:28 +0100)]
kernel/acpi: Remove bogus checks for < 0 of unsigned variables.
Sascha Wildner [Fri, 29 Jan 2021 11:28:07 +0000 (12:28 +0100)]
kernel/acpi: Fix some implementation specific shifting of signed ints.
All these are stored as unsigned.
Sascha Wildner [Fri, 29 Jan 2021 10:41:55 +0000 (11:41 +0100)]
kernel/acpi: Remove an unused struct definition.
Sascha Wildner [Fri, 29 Jan 2021 10:29:22 +0000 (11:29 +0100)]
kernel/acpi: Remove unneeded bus number check.
pcib_get_bus() never fails. Parent is pcib, so the bus number will be
valid.
Sascha Wildner [Fri, 29 Jan 2021 10:11:31 +0000 (11:11 +0100)]
kernel/acpi: Remove two redundant initializations.
Sascha Wildner [Fri, 29 Jan 2021 09:56:55 +0000 (10:56 +0100)]
kernel/acpi: Remove redundant NULL check.
AcpiGetObjectInfo() returned AE_OK and adinfo has already been
dereferenced at this point.
Antonio Huete Jimenez [Thu, 28 Jan 2021 12:23:07 +0000 (13:23 +0100)]
dsynth: Use semantic versioning-ish numbering for version
Matthew Dillon [Thu, 28 Jan 2021 01:31:40 +0000 (17:31 -0800)]
kernel - Separate XSAVE support from AVX support
* XSAVE may be supported without AVX, on certain CPUs and also under
hypervisors that expose XSAVEOPT without AVX.
* Always use XSAVE, when supported, regardless of whether AVX is supported
or not.
Submitted-by: chicken
Bug-ID: #3264
Matthew Dillon [Thu, 28 Jan 2021 01:20:03 +0000 (17:20 -0800)]
kernel - Add memory barriers to more __asm functions.
* Add memory barriers to more __asm functions that have memory
side-effects. This should help prevent any unexpected instruction
reordering around these functions.
Submitted-by: chicken
Bug-ID: #3263
Krzysztof Piecuch [Wed, 27 Jan 2021 23:38:33 +0000 (23:38 +0000)]
msdosfs: fix #3237 where reading the last sector of a file returned 0s
cluster_readx would load the correct data to cache except for the last
sector of a file, where the cache was filled with zeroes.
On small files (2 clusters) cluster_readx wouldn't even call
msdosfs_bmap, correctly read first cluster and return zeroes for the
second cluster.
Fix this by telling cluster_readx that the file is bigger than it
is. cluster_readx's `nblk` will then include the last sector.
Antonio Huete Jimenez [Tue, 26 Jan 2021 11:13:17 +0000 (12:13 +0100)]
dsynth.1: Several fixes
- Add some options and directives that were missing.
- Rearrange the manpage to match the output of 'dsynth help'
- Fix some new sentence, new line warnings from lint.
Sascha Wildner [Mon, 25 Jan 2021 05:32:24 +0000 (06:32 +0100)]
getipnodebyname.3: Fix missing whitespace.
Sascha Wildner [Sat, 23 Jan 2021 20:16:39 +0000 (21:16 +0100)]
Clean up markup of AF_INET* in a few manual pages.
Sascha Wildner [Fri, 22 Jan 2021 17:15:48 +0000 (18:15 +0100)]
Revert "Fix various mistakes (s/it were/it was/) in manual pages."
This reverts commit
e4adeac153e9f588eff22befbf196d2fd3444bc3.
Sascha Wildner [Fri, 22 Jan 2021 17:15:20 +0000 (18:15 +0100)]
kernel/clock_getres: Improve CPU clock ID sanity checking.
Aaron LI [Wed, 20 Jan 2021 14:01:39 +0000 (22:01 +0800)]
clock_settime(2): Return EINVAL if tv_sec < 0
The same argument check is also done in nanosleep(2)/clock_nanosleep(2),
and FreeBSD also does this check.
Aaron LI [Wed, 20 Jan 2021 02:40:13 +0000 (10:40 +0800)]
Use 'sysmsg_result' macro for consistency
Don't directly use the 'sm_result' union member in 'struct sysmsg',
consistent with other kernel code.
Aaron LI [Wed, 20 Jan 2021 02:26:40 +0000 (10:26 +0800)]
<sys/sysmsg.h>: Remove a deprecated and duplicate union member
In 'union sm_result', the 'int result' member is deprecated and replaced
by the 'int iresult' member. So remove the 'result' one and change the
'sysmsg_result' macro accordingly.
Aaron LI [Wed, 20 Jan 2021 02:09:37 +0000 (10:09 +0800)]
<sys/sysmsg.h>: Remove unused forward declarations
Aaron LI [Tue, 19 Jan 2021 14:41:43 +0000 (22:41 +0800)]
syscall.9: Add some missing info and fix outdated contents
* Update the syscall decleration (in syscalls.master) and generated
prototype (in sysproto.h) examples to match the current syntax.
* Fix 'uap->sysmsg_result' to 'sysmsg->sysmsg_result', and be explicit
that the function need to return 0 when the default 'sysmsg_result' is
updated.
* Don't mention the 'SCARG' macro (to extract syscall argument) since
it's now seldomly used in our codebase. (Syscall argument can be
intuitively extracted by 'uap->arg'.)
* Add a paragraph to describe the symbol exportation in libc via the
'libc/sys/Symbol.map' file.
* Mention the syscall entry point in the kernel a bit.
* Add 'sys/sys/sysmsg.h' and 'sys/sys/sysunion.h' to the FILES section,
while remove the obsolete 'sys/kern/syscalls.conf' (already folded
into makesyscalls.sh).
* Some minor formatting and wording tweaks.
Reviewed-by: swildner
Sascha Wildner [Tue, 19 Jan 2021 19:05:49 +0000 (20:05 +0100)]
nanosleep.2: List clock_nanosleep() in the NAME section.
Aaron LI [Mon, 18 Jan 2021 13:51:19 +0000 (21:51 +0800)]
<sys/sysmsg.h>: Add missing copyright and license header
Aaron LI [Sun, 17 Jan 2021 08:08:41 +0000 (16:08 +0800)]
Implement clock_nanosleep(2) system call
* Extend the nanosleep1() function in kern_time.c to support the
clock_nanosleep(2) system call. Add {kern,sys}_clock_nanosleep()
functions and update kern_nanosleep() accordingly.
* Add clock_nanosleep() syscall to syscalls.master and regenerate
syscall-related files.
* Update libc symbols with the new syscall.
* Add clock_nanosleep() warpper in libthread_xu.
* Update nanosleep.2 man page to describe clock_nanosleep().
* Update <time.h> and bump __DragonFly_version.
This work is loosely based on the FreeBSD implementation:
https://reviews.freebsd.org/rS315526
This clock_nanosleep(2) syscall passed all tests in the Open POSIX Test
Suite [0]:
conformance/interfaces/clock_nanosleep/1-1: execution: PASS
conformance/interfaces/clock_nanosleep/1-2: execution: PASS
conformance/interfaces/clock_nanosleep/1-3: execution: PASS
conformance/interfaces/clock_nanosleep/1-4: execution: PASS
conformance/interfaces/clock_nanosleep/1-5: execution: PASS
conformance/interfaces/clock_nanosleep/2-1: execution: PASS
conformance/interfaces/clock_nanosleep/2-2: execution: PASS
conformance/interfaces/clock_nanosleep/2-3: execution: PASS
conformance/interfaces/clock_nanosleep/3-1: execution: PASS
conformance/interfaces/clock_nanosleep/4-1: execution: PASS
conformance/interfaces/clock_nanosleep/5-1: execution: PASS
conformance/interfaces/clock_nanosleep/6-1: execution: PASS
conformance/interfaces/clock_nanosleep/9-1: execution: PASS
conformance/interfaces/clock_nanosleep/8-1: execution: PASS
conformance/interfaces/clock_nanosleep/10-1: execution: PASS
conformance/interfaces/clock_nanosleep/11-1: execution: PASS
conformance/interfaces/clock_nanosleep/13-1: execution: PASS
conformance/interfaces/clock_nanosleep/15-1: execution: PASS
[0] Open POSIX Test Suite: http://posixtest.sourceforge.net/
Reviewed-by: swildner, dillon, tuxillo, zach
Aaron LI [Mon, 18 Jan 2021 04:41:41 +0000 (12:41 +0800)]
nanosleep(2): Return EINVAL if tv_sec < 0 (POSIX-compliant)
When the requested sleep interval is negative, return EINVAL. This
behavior is the same as Linux and makes our nanosleep(2) pass all tests
in the Open POSIX Test Suite [0].
conformance/interfaces/nanosleep/1-1: execution: PASS
conformance/interfaces/nanosleep/1-2: execution: PASS
conformance/interfaces/nanosleep/1-3: execution: PASS
conformance/interfaces/nanosleep/2-1: execution: PASS
conformance/interfaces/nanosleep/3-1: execution: PASS
conformance/interfaces/nanosleep/3-2: execution: PASS
conformance/interfaces/nanosleep/4-1: execution: PASS
conformance/interfaces/nanosleep/5-1: execution: PASS
conformance/interfaces/nanosleep/5-2: execution: PASS
conformance/interfaces/nanosleep/6-1: execution: PASS
conformance/interfaces/nanosleep/7-1: execution: PASS
conformance/interfaces/nanosleep/7-2: execution: PASS
conformance/interfaces/nanosleep/10000-1: execution: PASS
[0] Open POSIX Test Suite: http://posixtest.sourceforge.net/
Aaron LI [Thu, 14 Jan 2021 05:06:02 +0000 (13:06 +0800)]
nanosleep(2): Plug a memory disclourse and be POSIX-compliant
The nanosleep1() called by sys_nanosleep() would only update rmt on
EINTR, but it can also return other errors, such as EINVAL. And in that
case, sys_nanosleep() would update the user-space rmtp by copying
garbage from its stack frame. This is not only a kernel memory
disclourse, but also not POSIX-compliant.
Fix sys_nanosleep() to update rmtp only on EINTR. In addition, zero the
kernel rmt variable for double safety.
Obtained-from: FreeBSD (r315510)
Reviewd-by: dillon
Aaron LI [Tue, 19 Jan 2021 13:52:36 +0000 (21:52 +0800)]
kern/makesyscalls.sh: Revert change to '#endif' comment
Well, I misread the '#ifdef _KERNEL' with '#ifndef', so the comment of
'#endif' is right. Revert the recent change to this part ;)
Reported-by: swildner
Aaron LI [Thu, 14 Jan 2021 11:30:41 +0000 (19:30 +0800)]
<sys/sysproto.h>: Regenerate after 'makesyscalls.sh' update
Aaron LI [Thu, 14 Jan 2021 11:24:42 +0000 (19:24 +0800)]
kern/makesyscalls.sh: Better place #undef and fix #endif comments
* Move the placement of '#undef PAD_' so it just follows the end of
syscall argument section.
* Fix the comments of '#endif', so that the '_SYS_SYSPROTO_H_' and
'_KERNEL' hierachies are now correct.
Aaron LI [Sat, 16 Jan 2021 09:02:41 +0000 (17:02 +0800)]
test/vmm: Refactor Makefile by using <bsd.prog.mk>
Aaron LI [Sat, 16 Jan 2021 09:00:59 +0000 (17:00 +0800)]
Use ${} instead of $() in various makefiles
Also use ${.TARGET} and ${.ALLSRC] wherever impossible.
Minor style adjustment in at(1)'s makefiles.
Sascha Wildner [Tue, 19 Jan 2021 01:36:45 +0000 (02:36 +0100)]
Fix various mistakes (s/it were/it was/) in manual pages.
Sascha Wildner [Tue, 19 Jan 2021 00:13:16 +0000 (01:13 +0100)]
libutil/setusercontext: Apply FreeBSD's
b149798e50fac1113a7.
FBSD commit msg:
Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext(). While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().
Tomohiro Kusumi [Mon, 18 Jan 2021 16:34:09 +0000 (01:34 +0900)]
usr.sbin/fstyp: Fix exfat detection
from FreeBSD
ddf61156132b610915325769cbb93ea11be0d433
Sascha Wildner [Sat, 16 Jan 2021 16:08:48 +0000 (17:08 +0100)]
Add a smbfs(5) manual page (taken from FreeBSD).
Sascha Wildner [Sat, 16 Jan 2021 15:59:47 +0000 (16:59 +0100)]
libc/citrus: Cleanup the DFprivate_1.0 section of the Symbol.map.
None of these symbols were ever in our libc.
Sascha Wildner [Sat, 16 Jan 2021 04:28:22 +0000 (05:28 +0100)]
libc/citrus: Remove two unused header files.
Dan Cross [Wed, 13 Jan 2021 23:55:47 +0000 (23:55 +0000)]
talkd: Find users in more than one talk request.
talkd was written to use `utmpentry` from `who`, which
caches the results of read the `utmpx` file. However,
talkd is usually invoked from inetd `wait` mode; it's
possible that a user might login after `talkd` starts;
with the cached utmpx data, one can't `talk` to that
user.
Further, consumption of the utmp data nulls it out for
subsequent requests. The result is that the first talk
succeeds, but subsequent requests fail.
The fix is to avoid using the `utmpentry` machinery,
and just read `utmp` directly every time we need to.
Signed-off-by: Dan Cross <cross@gajendra.net>
Dan Cross [Fri, 15 Jan 2021 03:16:17 +0000 (03:16 +0000)]
talk: talk into account sa_len field in sockaddr.
`osockaddr` predates the introduction of the sa_len
field in `struct sockaddr`. The family has moved to
the second field in the structure, but `talk` didn't
account for this when it constructs a `sockaddr_in`
to send data to another system.
The failure case was kind of odd: one could `talk`
to a user on, say, a Linux machine, the remote user
could respond, and things would work as expected.
However, the inverse case, where a user on Linux
tried to `talk` to a user on Dragonfly failed: the
talk announcement would be made, but an attempt to
respond would fail with a protocol error since the
`sin_family` field would be zero.
Signed-off-by: Dan Cross <cross@gajendra.net>
Sascha Wildner [Fri, 15 Jan 2021 15:22:03 +0000 (16:22 +0100)]
Update the pciconf(8) database.
January 11, 2021 snapshot from https://pci-ids.ucw.cz
Sascha Wildner [Fri, 15 Jan 2021 08:53:26 +0000 (09:53 +0100)]
Sync cmp(1) with FreeBSD. Mainly for
80445b7a3f738e0b which fixes a bug.
Reported-by: William Ahern <william@25thandclement.com>
Sascha Wildner [Wed, 13 Jan 2021 13:16:45 +0000 (14:16 +0100)]
hexdump.1/operator.7: Use Ta instead of literal tabs.
Matthew Dillon [Tue, 12 Jan 2021 06:33:02 +0000 (22:33 -0800)]
kernel - Fix atime field for PTYs
* Fix the atime field for PTYs. A calculation in the shortcut code
that avoids having to update the timestamp on every read() or
write() was reversed.
Reported-by: dancrossnyc
Matthew Dillon [Tue, 12 Jan 2021 06:22:14 +0000 (22:22 -0800)]
finger - Take into account terminal session ID
* The 'w' command tries to figure out what process is running on a TTY
line and emit that as part of its output. Update its heuristics to
select the "most interesting" process.
Reported-by: dancrossnyc
Bug-report: #3260
Matthew Dillon [Tue, 12 Jan 2021 06:20:06 +0000 (22:20 -0800)]
finger - Remove -T option
* This doesn't appear to work against anything, so remove it. FreeBSD
apparently removed this option in 2007.
Reported-by: dancrossnyc
Bug-report: #3258
Matthew Dillon [Tue, 12 Jan 2021 06:18:10 +0000 (22:18 -0800)]
finger - Fix 'lastlogx' logic
* finger(1) was simply incorrect in how it was trying to access
the `lastlogx` database; fix it to use the correct interface.
Reported-by: dancrossnyc
Bug-report: #3257
Matthew Dillon [Tue, 12 Jan 2021 06:13:40 +0000 (22:13 -0800)]
finger - Reduce printed Login name field width so line fits 80 cols
* With the TTY field expanded, reduce the Login name field width
so the output still fits in 80 cols.
Matthew Dillon [Tue, 12 Jan 2021 06:08:30 +0000 (22:08 -0800)]
finger - Widen TTY field to avoid truncation
* Widen the printed TTY field to deal with
longer tty names.
Reported-by: dancrossnyc
Bug-report: #3256
Tomohiro Kusumi [Sun, 10 Jan 2021 15:12:06 +0000 (00:12 +0900)]
usr.sbin/fstyp: Sync with NetBSD
Tomohiro Kusumi [Sat, 9 Jan 2021 15:39:56 +0000 (00:39 +0900)]
sys/vfs/ext2fs: Fix comment on htree dirent (disabled) issue on DragonFly
This sounded like ext3 on Linux had a similar problem, which is not true.
Tomohiro Kusumi [Sat, 9 Jan 2021 15:27:33 +0000 (00:27 +0900)]
usr.sbin/fstyp: Minor fix for HAMMER2
Tomohiro Kusumi [Sat, 9 Jan 2021 14:17:04 +0000 (23:17 +0900)]
usr.sbin/fstyp: Don't assert(0) for invalid HAMMER1/2 ondisk
Given purpose of fstyp, don't kill the process for invalid ondisk.
Just fail HAMMER1/2 detection.
Tomohiro Kusumi [Sat, 9 Jan 2021 13:29:16 +0000 (22:29 +0900)]
sys/vfs/hammer2: Add hammer2_print_uuid_mismatch()
Sascha Wildner [Sat, 9 Jan 2021 12:55:30 +0000 (13:55 +0100)]
md5.1: Remove dead references from SEE ALSO.
Reported-by: aly
Sascha Wildner [Sat, 9 Jan 2021 12:10:20 +0000 (13:10 +0100)]
libc/citrus: Fix some typos in DFprivate_1.0 in the Symbol.map.
Matthew Dillon [Thu, 7 Jan 2021 19:54:11 +0000 (11:54 -0800)]
kernel - Remove MAP_VPAGETABLE
* This will break vkernel support for now, but after a lot of mulling
there's just no other way forward. MAP_VPAGETABLE was basically a
software page-table feature for mmap()s that allowed the vkernel
to implement page tables without needing hardware virtualization support.
* The basic problem is that the VM system is moving to an extent-based
mechanism for tracking VM pages entered into PMAPs and is no longer
indexing individual terminal PTEs with pv_entry's.
This means that the VM system is no longer able to get an exact list of
PTEs in PMAPs that a particular vm_page is using. It just has a
flag 'this page is in at least one pmap' or 'this page is not in any
pmaps'. To track down the PTEs, the VM system must run through the
extents via the vm_map_backing structures hanging off the related
VM object.
This mechanism does not work with MAP_VPAGETABLE. Short of scanning
the entire real pmap, the kernel has no way to reverse-index a page
that might be indirected through MAP_VPAGETABLE.
* We will need actual hardware mmu virtualization to get the vkernel
working again.
Sascha Wildner [Tue, 5 Jan 2021 20:57:48 +0000 (21:57 +0100)]
Sync ACPICA with Intel's version
20210105.
iasl: Remove support for obsolete tables
Also, update copyrights.
For detailed list, please see sys/contrib/dev/acpica/changes.txt.
Sascha Wildner [Mon, 4 Jan 2021 22:39:59 +0000 (23:39 +0100)]
timeout.1: Use .Fx
Sascha Wildner [Mon, 4 Jan 2021 05:13:38 +0000 (06:13 +0100)]
sockaddr_snprintf.3: Use .Er for errno values.
Aaron LI [Sun, 3 Jan 2021 07:03:03 +0000 (15:03 +0800)]
timeout(1): Add -v/--verbose option to show diagnosis info
The -v/--verbose option enables this utility to show diagnosis info to
stderr about any signal sent on timeout.
This implementation refers to GNU coreutils's timeout(1).
Aaron LI [Sun, 3 Jan 2021 05:52:10 +0000 (13:52 +0800)]
timeout(1): Reduce some duplicate code
Merge the 'sig_alrm' and 'sig_term' conditionals, and thus reduce some
duplicate code.
Aaron LI [Sun, 3 Jan 2021 04:26:39 +0000 (12:26 +0800)]
timeout(1): Some minor tweaks and improvements
* Define exit status and macros and use them
* Improve the second kill logic by setting 'do_second_kill = false'
after configuring the second kill
* Minor style tweaks
* Reorder options in the man page, as well as the usage help
* Reorder the exit status in the man page
* Enhance the HISTORY section in the man page (obtained from NetBSD)
Aaron LI [Sun, 3 Jan 2021 04:11:56 +0000 (12:11 +0800)]
timeout(1): Port to DragonFly
Our procctl(2) is different from FreeBSD's procctl(2), so need to adjust
its usage.
Also hook into our build system and update the man page.
Aaron LI [Sun, 3 Jan 2021 02:46:46 +0000 (10:46 +0800)]
Import timeout(1) from FreeBSD
The timeout(1) utility runs a command with a time limit. It has also
been imported into NetBSD. This utility first appeared in GNU
coreutils.
This is a verbatim copy of FreeBSD's version. Necessary modifications
and updates will follow.
Sascha Wildner [Sat, 2 Jan 2021 21:26:51 +0000 (22:26 +0100)]
Fix some -Wjump_misses_init warnings (found by clang).
Sascha Wildner [Sat, 2 Jan 2021 20:50:01 +0000 (21:50 +0100)]
netstat(1): Clean up struct nlist array.
Sascha Wildner [Sat, 2 Jan 2021 17:22:26 +0000 (18:22 +0100)]
getaddrinfo(1): Actually hook into the build and remove unneeded headers.
The <sys/cdefs.h> should be removed along with the __FBSDID and we
include either <sys/types.h> or <sys/param.h> but not both.
Aaron LI [Sat, 2 Jan 2021 11:21:30 +0000 (19:21 +0800)]
Import getaddrinfo(1) from FreeBSD
The getaddrinfo(1) utility resolves host and service names to socket
addresses with getaddrinfo(3) and prints them in a user-friendly format.
Obtained from FreeBSD, which obtained it from NetBSD.
The examples in the man page has been adjusted to use
'www.dragonflybsd.org' instead of NetBSD ones :D
Thank swildner for bringing in sockaddr_snprintf(3) to libutil from
NetBSD, which is required by this utility.
Sascha Wildner [Sat, 2 Jan 2021 07:27:05 +0000 (08:27 +0100)]
libutil: Add sockaddr_snprintf() (taken from NetBSD).
The man page has been adjusted a bit since we don't support Apple Talk
protocol.
Aaron LI [Sat, 2 Jan 2021 02:56:31 +0000 (10:56 +0800)]
setbuf.3: Mention stdbuf(1) and update HISTORY & BUGS sections
Obtained-from: FreeBSD
Reported-by: swildner
Aaron LI [Fri, 1 Jan 2021 14:08:34 +0000 (22:08 +0800)]
Import stdbuf(1) together with libstdbuf(3) from FreeBSD
The stdbuf(1) is a utility to change the initial buffering of stdin,
stdout and stderr streams for a given command. It achieves this
functionality by preloading the libstdbuf(3) library and configuring the
needed environment variables. Under the hood, libstdbuf(3) library
calls setvbuf(3) to do the actual work.
Changes from FreeBSD:
* Removed 32bit i386 code from stdbuf(1)
* Fix typos and update HISTORY section in libstdbuf.3 man page
* Update the example to actually work on DragonFly
Sascha Wildner [Fri, 1 Jan 2021 14:48:50 +0000 (15:48 +0100)]
mandoc.db.5: Adjust a bit to DragonFly.
Sascha Wildner [Fri, 1 Jan 2021 13:28:16 +0000 (14:28 +0100)]
newvers.sh: Simplify a bit more.
Sascha Wildner [Fri, 1 Jan 2021 13:09:28 +0000 (14:09 +0100)]
Remove /usr/share/examples/etc/bsd-style-copyright.
/usr/share/examples/etc is supposed to hold the contents of an
unchanged /etc directory only. Also, our template is in
/COPYRIGHT so there is no point to keep a different one. Examples
of n-clause BSD licenses are widely available online, when needed.
Clean up newvers.sh, which was using the file for vers.c generation.
There is no need to put a license on generated files, let alone such
simple ones.
Sascha Wildner [Fri, 1 Jan 2021 11:01:21 +0000 (12:01 +0100)]
<unistd.h>: chroot_kernel() is DragonFly specific only.
Its prototype was put into the wrong #if/#endif section in
72f12c5b169.
Aaron LI [Fri, 1 Jan 2021 07:31:53 +0000 (15:31 +0800)]
libc/gen/devname.c: No need to include <paths.h>
Aaron LI [Fri, 1 Jan 2021 07:14:03 +0000 (15:14 +0800)]
Remove obsolete dev_mkdb(8)
The devname(3) has long been updated to determine the device name via
the 'kern.devname' sysctl provided by devfs(5). The dev.db created by
dev_mkdb(8) is thus unused and obsolete. So remove dev_mkdb(8) as well
and update relevant parts.
Aaron LI [Fri, 1 Jan 2021 07:04:37 +0000 (15:04 +0800)]
devname.3: Add a little example
Obtained from FreeBSD but with some updates.