summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r201290: Treat an empty argument as an error, instead ofru2010-01-061-0/+5
| | | | fetching the contents of the root directory.
* MFC r200793:delphij2010-01-041-0/+1
| | | | | | | Plug a memory leak. PR: bin/141836 Submitted by: Henning Petersen <henning.petersen at t-online.de>
* MFC of r200650, r200624edwin2009-12-242-16/+20
| | | | | Add Australian, New Zealand and Ukraian calendars to the "all" target". Nationalise Easter -> Pasen in calendar.dutch
* MFC r199805:attilio2009-12-194-198/+185
| | | | | | | | | | | | | | 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
* MFC r199803:attilio2009-12-191-4/+13
| | | | | | | Add the possibility to show informations about dropped packets on the input path when showing interfaces informations. Sponsored by: Sandvine Incorporated
* MFC of r199642edwin2009-12-061-0/+2
| | | | | | | | The output of perror(1) is now showing local messages for locales supported by libc/nls PR: bin/140499 Approved by: gnn@
* MFC r199946:bz2009-12-051-0/+10
| | | | | | | | | | | | 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]
* MFC r199066 + 199339:delphij2009-12-021-8/+28
| | | | | Apply a NetBSD fix (revision 1.12) to handle multi-session bzip2 files as created by pbzip2.
* MFC 199813, 199817, 199842, 199867:fanf2009-12-023-137/+315
| | | | Update unifdef to latest upstream version.
* MFC r199242: Use ncursesw to output the date field of vmstatume2009-11-222-2/+2
| | | | display with multi-byte string, correctly.
* MFC r199024:attilio2009-11-221-1/+1
| | | | | Use a safety belt for cases where corrupted narg can be passed to the ktrsyscall().
* MFC r197956:jh2009-11-152-4/+8
| | | | | | | | | | | | | - 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)
* MFC 198620:jhb2009-11-061-0/+81
| | | | | When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts and sum them to form the total counts.
* MFC r197437:emaste2009-11-051-3/+3
| | | | Use %zu for size_t, not %zd.
* MFCs of r197764, r197765, r197766, r197847:edwin2009-10-312-8/+37
| | | | | | | | 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
* MFC r197363: Update find(1) man page for -L/-delete interaction.jilles2009-10-291-1/+2
| | | | | | | | 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
* Merge r198118 from head to stable/8:rwatson2009-10-181-5/+5
| | | | | | | | | 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)
* MFC r197725:dougb2009-10-062-19/+8
| | | | | | The 6bone was decommissioned on 6/6/06, so remove references to it. Approved by: re (kib)
* MFC r196652: Fix the problem that the entry broke into two linesume2009-09-133-12/+24
| | | | | | with multi-byte AM/PM date format. Approved by: re (kib)
* MFC r196558: Don't try to mmap the contents of empty files. This behaviourcperciva2009-08-311-0/+4
| | | | | | | | | | 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)
* MFC 196399: fstat: fix fsid comparison when executed on systems with 64-bit longavg2009-08-202-2/+2
| | | | | | | | | | | | | | | | | | | | | 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)
* MFC calendar.freebsdfluffy2009-08-151-0/+1
| | | | Approved by: re (rwatson) miwi (mentor)
* Merge r196120 from head to stable/8:rwatson2009-08-131-4/+2
| | | | | | Update procstat(1) for the fact that devfs paths are no longer unsupported. Approved by: re (kib)
* Correct a stack underflow in gzip:delphij2009-07-311-1/+5
| | | | | | | | | | | | | | - 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)
* Update less to v436. This is considered as a bugfix release from vendor.delphij2009-07-291-4/+5
| | | | | | | | | | 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)
* Introduce a new sysctl process mib, kern.proc.groups which adds thebrooks2009-07-241-2/+40
| | | | | | | | | | | | 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
* Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar tojhb2009-07-241-0/+3
| | | | | | | | | | | 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
* Move the check to ensure the locate database has the minimum required sizejhb2009-07-242-3/+2
| | | | | | | | | | 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
* - Add my birthdayyzlin2009-07-211-0/+1
| | | | | | - Add myself to ports committers and to lwhsu's mentee list Approved by: re (kib), lwhsu (mentor)
* Remove no longer needed #include after removing the legacybz2009-07-181-1/+0
| | | | | | | vimage API in r195741. Reviewed by: rwatson Approved by: re (kib)
* Make mklocale work again, now that fwrite()'s return codes are different.ed2009-07-141-2/+2
| | | | | Submitted by: Navdeep Parhar <nparhar gmail com> Approved by: re (kib)
* Add manual page links to advertise procstat(1) a little better.trasz2009-07-093-3/+6
| | | | Approved by: re (kib)
* Fix some uninitialise variables.brian2009-07-081-4/+4
| | | | | | | PR: 136383 Submitted by: Ulrich Spoerlein - uqs at spoerlein dot net Approved by: re (kib) MFC after: 3 weeks
* This addresses some issues with my earlier -R fix thatkientzle2009-07-062-66/+74
| | | | | | | | | | | | | | 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)
* This fixes bsdcpio's -R option to accept numerickientzle2009-07-032-20/+50
| | | | | | | | | | | | | | | 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)
* Support shadow.byname and shadow.byuid maps, protecting them bybrian2009-06-253-0/+3
| | | | | | | | | | 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
* Sync with NetBSD:delphij2009-06-243-10/+10
| | | | | | | | | | - 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
* Change the ABI of some of the structures used by the SYSV IPC API:jhb2009-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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]
* Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementationdfr2009-06-243-20/+18
| | | | and will be removed.
* Add libjail, a (somewhat) simpler interface to the jail_set and jail_getjamie2009-06-242-13/+6
| | | | | | system calls and the security.jail.param sysctls. Approved by: bz (mentor)
* %.s expects an int as the length specifier, so cast properly.delphij2009-06-231-1/+2
|
* Use strlcpy() instead of manually setting the last byte of the array to \0.delphij2009-06-231-8/+4
|
* Use strlcpy() instead of explicitly set \0 on the tail of the array.delphij2009-06-231-2/+1
|
* Use C99 initialization when necessary; apply static to internal rountines.delphij2009-06-231-5/+5
| | | | This makes nfsstat WARNS=3 clean.
* K&R -> ANSIdelphij2009-06-231-3/+1
|
* Use getprogname() instead of referencing __progname.delphij2009-06-231-3/+2
|
* Usermode portion of the support for swap allocation accounting:kib2009-06-231-13/+23
| | | | | | | | | | | - update for getrlimit(2) manpage; - support for setting RLIMIT_SWAP in login class; - addition to the limits(1) and sh and csh limit-setting builtins; - tuning(7) documentation on the sysctls controlling overcommit. In collaboration with: pho Reviewed by: alc Approved by: re (kensmith)
* Add support for uncompressing pack(1)'ed files. Pack(1) is a program founddelphij2009-06-212-1/+359
| | | | | | | | | | | | in some commercial Unix systems, which utilizes Huffman minimum redundancy code tree to compress files. This implementation supports the "new" pack format only, just like GNU gzip did. Thanks for oliver@'s archive set which I can test against, and Mingyan Guo for providing helpful review of my code. PR: bin/109567 MFC after: 1 month
* Restore the check against running as root that I accidentally removed inbrooks2009-06-201-0/+9
| | | | r194493.
* Implement the -z (zero counters) option for the various bpf counters.csjp2009-06-192-1/+9
| | | | | | | | Add necessary changes to the kernel for this (basically introduce a bpf_zero_counters() function). As well, update the man page. MFC after: 1 month Discussed with: rwatson
OpenPOWER on IntegriCloud