MFC r201512:
Modernize scandir(3) and alphasort(3) interfaces according to the IEEE
Std 1003.1-2008.
MFC r201602:
Move scandir(3) and alphasort(3) into XSI namespace.
MFC r201604:
Use thunks to adapt alphasort-like interface to the comparision function
required by qsort() and qsort_r().
MFC r202556 (by ache):
Use strcoll() in opendir() and alphasort(). Remove some comments.
MFC r202572 (by ache):
Revert to using strcmp() for opendir().
MFC r202677 (by ache):
Style.
MFC r202679 (by ache):
Style: rename internal function to opendir_compar().
MFC r202691 (by ache):
For alphasort(3) add reference to strcoll(3).
MFC r202693 (by ache):
Style: reword comment.
The devices that supported EVFILT_NETDEV kqueue filters were removed in
r195175. Remove all definitions, documentation, and usage.
The change of function signature for vlan_link_state() was not merged to
maintain the ABI.
- Remove -d option, whois.nic.mil doesn't exist anymore.
- Make whois capable of searching for IPv6 addresses just like it can
do for IPv4 addresses without having to explicetly specify that the
ARIN server should be used to get the initial information.
PR: bin/142507, bin/128725
Submitted by: Dan Mahoney <danm@prime.gushi.org>, "Matt D. Harris" <mdh_lists@yahoo.com>
Fix return code in the case of successful file transfer, broken in
tftp.c 1.13
PR: bin/117452
Submitted by: Spencer Minear minear securecomputing.com
Approved by: ed (mentor, implicit)
Change gcore in order to get rid of the procfs support and use FreeBSD's
specific interfaces. Main changes:
- now gcore recognizes threads within the the process and handle dumps on
a thread scope
- the process to be analyzed should be stopped while gcore runs
- gcore may not work with processes that are being debugged with gdb or
truss
- ptrace may let interruptible calls to return EINTR, thus dirtying
signals handling within the process
Sponsored by: Sandvine Incorporated
Add the possibility to show informations about dropped packets on the
input path when showing interfaces informations.
Sponsored by: Sandvine Incorporated
Add more statistics variables for IPcomp.
Try to version the struct in a backward compatible way.
People asked for the versioning of the stats structs in general before.
Note: old netstat binaries, as only consumer, continue to work as they are
still using kvm but will not display the new stats. [1]
Discussed with: rwatson [1]
- Catch SIGHUP to perform cleanup before exiting.
- Exit if getch() returns with an error other than EINTR. Otherwise
systat(1) may get stuck in an infinite loop if it doesn't receive
SIGHUP when terminal closes.
- Remove attempt to clear stdio error indicators. getch() doesn't use
stdio, making it useless.
- Remove unneeded masking of getch() return value.
PR: bin/107171
Approved by: trasz (mentor)
Modified locale(1) to be able to show the altmon_X fields and the
[cxX]_fmt's. Also modify the "-k list" option to display only
fields with a certain prefix.
Add the comment "(FreeBSD only)" to the altmonth_x keywords
It is a bit unfortunate that the example to delete broken symlinks now uses
rm(1), but allowing this with -delete would require fixing fts(3) to not
imply FTS_NOCHDIR if FTS_LOGICAL is given (or hacks in the -delete option).
PR: bin/90687
Print routing statistics as unsigned short rather than unsigned int,
otherwise sign extension leads to unlikely values when in the negative
range of the signed short structure fields that hold the statistics.
The type used to hold routing statistics is arguably also incorrect.
Approved by: re (bz)
was harmless prior to r195693, when mmap(2) changed from silently ignoring
requests for mapping zero bytes to returning EINVAL; this commit can be seen
as adjusting for the change in mmap(2) in order to make look(1) act like it
did previously.
Reviewed by: jhb
Approved by: re (kib)
This affects only fstat on zfs and devfs, only on 64-bit systems
and only when fsid is greater than 2^31 - 1.
When fstat examines a file via stat(2) it takes uint32_t st_dev
and assigns to (signed) (64-bit) long fsid, this results in
a positive value.
When fstat examines opened files it takes int32_t f_fsid.val[0]
and assigns to (signed) (64-bit) long fsid, this results in
a negative value.
So, while initially st_dev and f_fsid.val[0] have the same bit
values they get promoted to different 64-bit values because
of the signed-vs-unsigned difference.
A fix is to use "more natural" positive numbers by introducing
intermediate unsigned cast for f_fsid.val[0].
Reviewed by: jhb, lulf
Approved by: re (kib)
MFC after: 1 week (to stable/7)
- Limit suffix to be no more than 30 bytes long. This matches GNU
behavior.
- Correct usage of memcpy().
Note that this commit only corrects the stack underflow issue, we
still need some other fixes to cover other edges. [1]
Reported by: Ron Jude <ronj wytheville org>
Discussed with: Matthew Green (original NetBSD gzip author),
Eygene Ryabinkin <rea-fbsd codelabs ru> [1]
Approved by: re (kib)
Major changes from v429:
* Don't pass "-" to non-pipe LESSOPEN unless it starts with "-".
* Allow a fraction as the argument to the -# (--shift) option.
* Fix highlight bug when underlined/overstruck text matches at end of line.
* Fix non-regex searches with ctrl-R.
Approved by: re (kensmith, kib)
ability to retrieve the group list of each process.
Modify procstat's -s option to query this mib when the kinfo_proc
reports that the field has been truncated. If the mib does not exist,
fall back to the truncated list.
Reviewed by: rwatson
Approved by: re (kib)
MFC after: 2 weeks
a device pager (OBJT_DEVICE) object in that it uses fictitious pages to
provide aliases to other memory addresses. The primary difference is that
it uses an sglist(9) to determine the physical addresses for a given offset
into the object instead of invoking the d_mmap() method in a device driver.
Reviewed by: alc
Approved by: re (kensmith)
MFC after: 2 weeks
when using mmap() before invoking mmap(). This avoids a confusing error
message when locate is invoked against a zero-size database after the
recent change to make mmap() fail requests to map 0 bytes.
Submitted by: Jaakko Heinonen jh of saunalahti dot fi
Approved by: re (kensmith)
MFC after: 1 week
were pointed out by Brooks Davis and Alexey Dokuchaev:
* It now tries to lookup arguments as names first, then tries
to parse them as numbers. In particular, this makes the
behavior consistent with POSIX conventions when usernames
consist entirely of digits.
* It now uses strtoul() for the numeric parsing.
Finally, I've included an update to the test harness
to exercise the new numeric cases for -R.
Approved by: re (kib)
user or group Ids as well as user or group names.
In particular, this fixes freesbie2, which uses
-R 0:0 to copy a bunch of files so that the result
will be owned by root.
Also fixes a related bug that mixed-up the uid
and gid specified by -R when in passthrough mode.
Thanks to Dominique Goncalves for reporting this
regression.
Approved by: re (kib)
insisting on privileged port access.
Include /var/yp/Makefile.local if it exists and suggest using
it to override /var/yp/Makefile behaviour.
Approved by: re (kib)
MFC after: 3 weeks
- gzip -n does not store timestamp; [1]
- Reduce diff against NetBSD by moving some casts in our local
versions.
PR: bin/134955
Obtained from: NetBSD
MFC after: 1 month
- The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned
short.
- The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned
short.
- The mode member of struct ipc_perm is now mode_t instead of unsigned short
(this is merely a style bug).
- The rather dubious padding fields for ABI compat with SV/I386 have been
removed from struct msqid_ds and struct semid_ds.
- The shm_segsz member of struct shmid_ds is now a size_t instead of an
int. This removes the need for the shm_bsegsz member in struct
shmid_kernel and should allow for complete support of SYSV SHM regions
>= 2GB.
- The shm_nattch member of struct shmid_ds is now an int instead of a
short.
- The shm_internal member of struct shmid_ds is now gone. The internal
VM object pointer for SHM regions has been moved into struct
shmid_kernel.
- The existing __semctl(), msgctl(), and shmctl() system call entries are
now marked COMPAT7 and new versions of those system calls which support
the new ABI are now present.
- The new system calls are assigned to the FBSD-1.1 version in libc. The
FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls.
- A simplistic framework for tagging system calls with compatibility
symbol versions has been added to libc. Version tags are added to
system calls by adding an appropriate __sym_compat() entry to
src/lib/libc/incldue/compat.h. [1]
PR: kern/16195 kern/113218 bin/129855
Reviewed by: arch@, rwatson
Discussed with: kan, kib [1]