Commit Graph

9250 Commits

Author SHA1 Message Date
Rebecca Cran
b9d3fd67b9 MFC r203688:
Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows
the -M option to be used without specifying -N.

PR:	bin/138146
Approved by:	rrs (mentor)
2010-02-18 10:46:25 +00:00
Xin LI
0985bbeaab MFC r202060:
Add a new option, -q howmany, which when used in conjuction with -w,
exits netstat after _howmany_ outputs.

Requested by:	thomasa
Reviewed by:	freebsd-net (bms, old version in early 2007)
2010-02-10 00:34:13 +00:00
Jaakko Heinonen
5e4fd6c798 MFC r200781:
Cast time_t values to intmax_t and use %jd with printf.
2010-02-08 15:55:01 +00:00
Jaakko Heinonen
46e7e3ebbc MFC r200780:
Remove non-working special case for pipe(2) from amd64-fbsd32.c and
i386-fbsd.c. Add pipe(2) to syscall table to decode it's pointer
argument properly and re-add special handling for pipe(2) return value
to print_syscall_ret().

PR:		bin/120870
2010-02-08 15:53:28 +00:00
Jaakko Heinonen
3ede63a7e3 MFC r200752:
Avoid sharing the file descriptor of the output file with traced
processes by setting the FD_CLOEXEC flag for the output file.

PR:		bin/140493
2010-02-08 15:50:51 +00:00
Jaakko Heinonen
33e6da3c3a MFC r200751:
Add fork(2), getegid(2), geteuid(2), getgid(2), getpid(2), getpgid(2),
getpgrp(2), getppid(2), getsid(2) and getuid(2) to syscall table to
decode their arguments correctly.
2010-02-08 15:48:18 +00:00
Jaakko Heinonen
37a33496e2 MFC r200632:
The input line length limit mentioned on the manual page was removed by
r176119.
2010-02-06 11:42:23 +00:00
Jaakko Heinonen
f8d5cb4579 MFC r200441:
The input line length limit mentioned on the manual page was removed by
r179374.
2010-02-06 11:39:33 +00:00
Edward Tomasz Napierala
4e86d39db2 MFC r196839:
Add NFSv4 ACL support to find(1).
2010-01-30 14:54:12 +00:00
George V. Neville-Neil
fbbbfe0ba5 MFC r196797:
Add ARP statistics to the kernel and netstat.
2010-01-28 16:48:44 +00:00
Alberto Villa
df4743bc4a - MFC r197788, r203040, r203045, r203048
Approved by:	tabthorpe (mentor)
2010-01-27 18:12:22 +00:00
Gavin Atkinson
18fab66957 Merge r200318 from head: add myself to calendar.freebsd. 2010-01-27 15:36:19 +00:00
Konstantin Belousov
b3c4be736e Merge scandir(3) interface update to stable/8.
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.
2010-01-24 12:35:36 +00:00
Brooks Davis
52c240aaf4 MFC r201350:
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.
2010-01-22 19:51:34 +00:00
Edwin Groothuis
73510ebf05 MFC of 202280, 202281
- 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>
2010-01-21 10:16:21 +00:00
Gavin Atkinson
322a943070 Merge r201429:
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)
2010-01-17 10:58:59 +00:00
Ruslan Ermilov
f96c46c6ab Update to a 26-Nov-2009 release. 2010-01-15 14:20:01 +00:00
Ruslan Ermilov
c7fabb7176 MFC r201290: Treat an empty argument as an error, instead of
fetching the contents of the root directory.
2010-01-06 08:26:43 +00:00
Xin LI
90ad4a8e4c MFC r200793:
Plug a memory leak.

PR:		bin/141836
Submitted by:	Henning Petersen <henning.petersen at t-online.de>
2010-01-04 01:07:32 +00:00
Edwin Groothuis
85f5f3b435 MFC of r200650, r200624
Add Australian, New Zealand and Ukraian calendars to the "all" target".
Nationalise Easter -> Pasen in calendar.dutch
2009-12-24 01:28:26 +00:00
Attilio Rao
ebc5dece54 MFC r199805:
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
2009-12-19 19:30:27 +00:00
Attilio Rao
2df3481531 MFC r199803:
Add the possibility to show informations about dropped packets on the
input path when showing interfaces informations.

Sponsored by:	Sandvine Incorporated
2009-12-19 19:25:35 +00:00
Edwin Groothuis
0b1ab65e97 MFC of r199642
The output of perror(1) is now showing local messages for locales
supported by libc/nls

PR:             bin/140499
Approved by:    gnn@
2009-12-06 21:07:47 +00:00
Bjoern A. Zeeb
87d7d0abb5 MFC r199946:
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]
2009-12-05 19:21:58 +00:00
Xin LI
23ca7b86bd MFC r199066 + 199339:
Apply a NetBSD fix (revision 1.12) to handle multi-session bzip2 files
as created by pbzip2.
2009-12-02 21:58:00 +00:00
Tony Finch
cb0593b42c MFC 199813, 199817, 199842, 199867:
Update unifdef to latest upstream version.
2009-12-02 15:30:53 +00:00
Hajimu UMEMOTO
c2a8874e1a MFC r199242: Use ncursesw to output the date field of vmstat
display with multi-byte string, correctly.
2009-11-22 17:16:37 +00:00
Attilio Rao
fa5f8aabc7 MFC r199024:
Use a safety belt for cases where corrupted narg can be passed to the
ktrsyscall().
2009-11-22 16:13:16 +00:00
Jaakko Heinonen
f969a7ac4b MFC r197956:
- 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)
2009-11-15 14:11:26 +00:00
John Baldwin
8da42c8a89 MFC 198620:
When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
and sum them to form the total counts.
2009-11-06 20:33:40 +00:00
Ed Maste
9d37c171d7 MFC r197437:
Use %zu for size_t, not %zd.
2009-11-05 02:27:56 +00:00
Edwin Groothuis
05edd60be4 MFCs of r197764, r197765, r197766, r197847:
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
2009-10-31 06:35:40 +00:00
Jilles Tjoelker
5ad306115b MFC r197363: Update find(1) man page for -L/-delete interaction.
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
2009-10-29 21:25:16 +00:00
Robert Watson
4b94fa7835 Merge r198118 from head to stable/8:
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)
2009-10-18 15:58:57 +00:00
Doug Barton
a3cd0ffc70 MFC r197725:
The 6bone was decommissioned on 6/6/06, so remove references to it.

Approved by:	re (kib)
2009-10-06 22:15:12 +00:00
Hajimu UMEMOTO
285c40cb98 MFC r196652: Fix the problem that the entry broke into two lines
with multi-byte AM/PM date format.

Approved by:	re (kib)
2009-09-13 17:01:34 +00:00
Colin Percival
ee1db5ae45 MFC r196558: Don't try to mmap the contents of empty files. This behaviour
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)
2009-08-31 13:02:21 +00:00
Andriy Gapon
2c68e2fb1e MFC 196399: fstat: fix fsid comparison when executed on systems with 64-bit long
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)
2009-08-20 11:04:31 +00:00
Dima Panov
1ffdef9f28 MFC calendar.freebsd
Approved by:	re (rwatson) miwi (mentor)
2009-08-15 16:04:36 +00:00
Robert Watson
7a34e29bc6 Merge r196120 from head to stable/8:
Update procstat(1) for the fact that devfs paths are no longer unsupported.

Approved by:	re (kib)
2009-08-13 14:38:09 +00:00
Xin LI
deb6327793 Correct a stack underflow in gzip:
- 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)
2009-07-31 08:37:27 +00:00
Xin LI
f0be0a1f8c Update less to v436. This is considered as a bugfix release from vendor.
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)
2009-07-29 09:20:32 +00:00
Brooks Davis
254d03c508 Introduce a new sysctl process mib, kern.proc.groups which adds the
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
2009-07-24 19:12:19 +00:00
John Baldwin
013818111a Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to
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
2009-07-24 13:50:29 +00:00
John Baldwin
29985e350d Move the check to ensure the locate database has the minimum required size
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
2009-07-24 13:40:25 +00:00
Yi-Jheng Lin
bd8311d481 - Add my birthday
- Add myself to ports committers and to lwhsu's mentee list

Approved by:	re (kib), lwhsu (mentor)
2009-07-21 09:54:04 +00:00
Bjoern A. Zeeb
da1b35844b Remove no longer needed #include after removing the legacy
vimage API in r195741.

Reviewed by:	rwatson
Approved by:	re (kib)
2009-07-18 10:36:18 +00:00
Ed Schouten
523a386d23 Make mklocale work again, now that fwrite()'s return codes are different.
Submitted by:	Navdeep Parhar <nparhar gmail com>
Approved by:	re (kib)
2009-07-14 09:19:33 +00:00
Edward Tomasz Napierala
e50022797f Add manual page links to advertise procstat(1) a little better.
Approved by:	re (kib)
2009-07-09 16:40:00 +00:00
Brian Somers
58a654f664 Fix some uninitialise variables.
PR:		136383
Submitted by:	Ulrich Spoerlein - uqs at spoerlein dot net
Approved by:	re (kib)
MFC after:	3 weeks
2009-07-08 10:16:16 +00:00