Commit Graph

10151 Commits

Author SHA1 Message Date
Ed Schouten
03d26e9e38 Use integer to store the result of getch().
We need to use an integer to make the comparison against ERR work.

MFC after:	3 months
2011-10-16 08:36:10 +00:00
Ed Schouten
43f65c0c3c Remove WARNS line. This tool builds with WARNS=6 properly. 2011-10-16 08:14:12 +00:00
Ed Schouten
1e2070ab5b Fix build of m4 with WARNS=6.
Change the parser; rename `exp' to `exponent' not to collide with exp(3).
2011-10-16 08:09:17 +00:00
Ed Schouten
aa404b67bb Remove unneeded WARNS=3 lines.
It seems these two tools can be built properly with WARNS=6, even on
architectures that are stricter about alignment.
2011-10-16 08:04:43 +00:00
Ed Schouten
196769ee58 Build at(1) with NO_WFORMAT instead of WARNS=1. 2011-10-16 07:57:01 +00:00
Ed Schouten
73b018e38e Make some internal fixes to ruptime(1):
- Prevent possible unaligned access to struct whoent.
- Increase uptime column by one, to properly print hosts with an uptime
  greater than 1000 days.
- Reduce code complexity by storing struct whod inside struct hs.
- Set WARNS to 6.

MFC after:	3 months
2011-10-16 07:36:27 +00:00
Xin LI
d9b3a15b37 According to the NetBSD foundation [1]:
Third parties are encouraged to change the license on any files which have
a 4-clause license contributed to the NetBSD Foundation to a 2-clause
license. We would also encourage you to inform us about these files, so
that we can continue to track the many places in which NetBSD is used.

http://www.netbsd.org/about/redistribution.html#why2clause [1]

Requested by:	joel@
2011-10-16 07:35:26 +00:00
Xin LI
41cbfdc954 Partially revert r226274, the old code was right. 2011-10-16 07:05:43 +00:00
Mikolaj Golub
8d105928ec In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR:		bin/161526
Reported by:	Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by:	Stefan Bethke <stb@lassitu.de>
MFC after:	3 days
2011-10-15 19:08:22 +00:00
Ed Schouten
2bd338d6c4 Fix whitespace inconsistencies in systat(1).
According to md5(1), the resulting binary is the same.
2011-10-15 13:20:36 +00:00
Ed Schouten
50af444a74 Put parentheses in the right place.
Noted by:	jilles@
Broken by:	me. :-(
2011-10-14 10:43:55 +00:00
Ed Schouten
b7cf00e8d9 Make nl(1) build with WARNS=6.
Obtained from:	NetBSD
2011-10-14 07:28:39 +00:00
Ed Schouten
51b671f6de Build last(1) and leave(1) with WARNS=6.
These ports were only built with WARNS=1, because they use certain
format extensions. We can use NO_WFORMAT for that instead.
2011-10-14 07:26:20 +00:00
Ed Schouten
b173dd440b Build tr(1) with WARNS=6. 2011-10-14 07:25:20 +00:00
Ed Schouten
583458543c Build look(1) with WARNS=6. 2011-10-14 07:24:48 +00:00
Ed Schouten
c5d693c5d0 Build finger(1) with WARNS=6. 2011-10-14 07:24:23 +00:00
Raphael Kubo da Costa
91a7fc18f0 Add myself to committers-ports.dot and calendar.freebsd.
Approved by:	avilla (mentor)
2011-10-13 20:36:43 +00:00
Dag-Erling Smørgrav
51b6c61f98 Clean up mkioctls a bit, and fix cross-building by checking ${MACHINE}
instead of $(uname -m).

Pointed out by:	nyan@
2011-10-13 16:29:24 +00:00
Dag-Erling Smørgrav
81a3139422 Make kdump compile cleanly at WARNS level 6, with one exception: the
ipfilter headers contain a duplicated function declaration.  Turn off
-Werror to allow kdump to compile in spite of this.

It would be neat to be able to turn off -Werror on a file-by-file basis...

PR:		bin/161478
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2011-10-12 21:45:12 +00:00
Gleb Kurtsou
bfcdfc8b98 Add myself
Approved by:	mdf (mentor)
2011-10-12 20:18:13 +00:00
Dimitry Andric
ce4903ad98 Add symlink from clang to clang-cpp, so you can use CPP=clang-cpp in
Makefiles.  Also add a manpage symlink for it.

MFC after:	3 days
2011-10-12 17:47:15 +00:00
Dimitry Andric
0e19228d25 Add manpage symlink for clang++(1).
PR:		docs/149051
MFC after:	3 days
2011-10-12 17:25:49 +00:00
Xin LI
6a99195fb8 - Fix an off-by-one bug in addgroup().
- Fix the error message when setgid() failed.

PR:		bin/161509
Submitted by:	Jeremy Huddleston <jeremyhu apple com>
MFC after:	2 weeks
2011-10-12 01:19:12 +00:00
Gabor Kovesdan
bbf9339dbb - Fix counting of match limit (-m)
Reported by:	Nali Toja <nalitoja@gmail.com>
Approved by:	delphij (mentor)
2011-10-12 01:09:57 +00:00
Gabor Kovesdan
afbbd357de - Use getprogname() instead of __progname
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon

Approved by:	delphij (mentor)
2011-10-11 22:27:23 +00:00
Dag-Erling Smørgrav
c601ad8eeb Add a new trace point, KTRFAC_CAPFAIL, which traces capability check
failures.  It is included in the default set for ktrace(1) and kdump(1).
2011-10-11 20:37:10 +00:00
Dag-Erling Smørgrav
661522f5f3 The previous commit did not fix the issue since it did not prevent sign
extension.  Cast to u_register_t first, then to uintmax_t.

Submitted by:	bde@
2011-10-11 15:04:58 +00:00
Dag-Erling Smørgrav
63a896e49b Cast to unsigned for %#jx.
Noticed by:	jh@
2011-10-11 07:46:45 +00:00
Xin LI
140c037a0c Incorporate recent changes from NetBSD. Most notable change is the addition
of support of decompressing xz files.

Obtained from:	NetBSD
2011-10-10 06:37:32 +00:00
Dag-Erling Smørgrav
95bb676aee Address some of bde@'s concerns with the new code. 2011-10-08 21:02:08 +00:00
Dag-Erling Smørgrav
515dfc239d Teach kdump(1) to decode capability bitmasks.
MFC after:	3 weeks
2011-10-08 13:01:38 +00:00
Dag-Erling Smørgrav
6eaa54110b Fix the dependency issue properly by a) moving kdump_subr.c to the front
of the SRCS list and b) listing kdump_subr.h in DPSRCS.
2011-10-08 12:59:41 +00:00
Dag-Erling Smørgrav
d09e66be12 Bring ioctlname() in line with all the other *name() functions, which
actually print the name (or the numeric value, if they can't figure out
the correct name) instead of just returning a pointer to it.  Also, since
ioctl numbers are not and probably never will be unique, drop support for
using a switch statement instead of an if/else chain.
2011-10-08 12:47:00 +00:00
Dag-Erling Smørgrav
09307b2547 I appreciate the logic behind using a (void) cast to indicate that the
return value is intentionally ignored, but frankly, all it does is
get in the way of the code.

Also fix a few other incorrect casts, such as (void *)malloc(foo) and
passing signed values to %x.
2011-10-08 12:28:06 +00:00
Dag-Erling Smørgrav
e4bb45b1ce Fix casting. 2011-10-08 12:21:51 +00:00
Dag-Erling Smørgrav
c02541ee80 Whitespace. 2011-10-08 12:10:16 +00:00
Dag-Erling Smørgrav
73430055e6 C has had swicth statements for 40 years or so. It's about time we
started using them.
2011-10-08 11:51:48 +00:00
Dag-Erling Smørgrav
77e23dbe07 Sort and line up. 2011-10-08 11:39:00 +00:00
Dag-Erling Smørgrav
34bb8e6d12 1) Some of the #defines or enums for which we auto-generate naming
functions may be wider than int, so use intmax_t throughout.  Also
   add missing casts in printf() calls.

2) Clean up some of the auto-generated code to improve readability.

3) Auto-generate kdump_subr.h.  Note that this requires a semi-ugly hack
   in the Makefile to make sure it is generated before make(1) tries to
   build kdump.c, or preprocess it for 'make depend'.

MFC after:	3 weeks
2011-10-08 09:57:29 +00:00
Ed Schouten
4a955f14cf Remove extraneous WARNS=7.
WARNS above 6 has no use. Also, all of usr.bin is also built with
WARNS=6 by default.

Discussed with:	edwin
2011-10-08 07:20:12 +00:00
Jakub Wojciech Klama
ae07436f81 Add myself.
Approved by:	wkoszek (mentor)
2011-10-07 23:12:33 +00:00
Xin LI
87ef283176 Fix build on i386 and arm.
Tested with:	make universe
Pointy hat to:	delphij
2011-10-06 04:39:18 +00:00
Gabor Kovesdan
f20f6f3fdf Update BSD grep to the latest development version. It has some code
backported that was written for the TRE integration project in Google
Summer of Code 2011.  This is a temporary solution until the whole
regex library is not replaced so that BSD grep development can continue
and the backported code gets some review and testing.  This change only
improves scalability slightly, there is no big performance boost yet
but several minor bugs have been found and fixed.

Approved by:	delphij (mentor)
Sposored by:	Google Summer of Code 2011
MFC after:	1 week
2011-10-05 09:56:43 +00:00
Dag-Erling Smørgrav
b6f6aba365 latin1 -> utf8 2011-10-04 15:00:54 +00:00
Adrian Chadd
c6ae748382 Handle the situation where fixups_close() has been called but more fixups
are still available on the queue.

Without this, the fixups producer/consumer pipeline will artifically terminate
before all of the fixups have been processed, leading to incomplete updates
and generally quite unhappy users.

Submitted by:	mux
2011-10-04 14:26:45 +00:00
Adrian Chadd
787ac3452c Update the comment to reflect what is actually going on.
Submitted by:	mux
2011-10-04 14:25:10 +00:00
Ed Schouten
05806a06c5 Correct column with for device numbers made in previous change.
The device number should be displayed using only five columns -- not eight.
2011-10-01 09:16:07 +00:00
Glen Barber
ef87c4dcd5 Fix a few grammar and mdoc nits in script.1
PR:		161088
Submitted by:	Ben Kaduk ( kaduk % mit ! edu )
MFC after:	1 week
Need-MFC:	225809
2011-09-29 02:29:32 +00:00
Eitan Adler
963527148e - I am not the oldest committer alive (yet)
Approved by:	bapt (mentor)
2011-09-28 21:42:13 +00:00
Eitan Adler
a2f4ffd69c - fix whitespace issue in calendar
- add a n after \

Submitted by:	brueffer
Approved by:	bapt (mentor)
2011-09-28 20:46:52 +00:00
Ed Schouten
9f365aa1d6 Get rid of major/minor number distinction.
As of FreeBSD 6, devices can only be opened through devfs. These device
nodes don't have major and minor numbers anymore. The st_rdev field in
struct stat is simply based a copy of st_ino.

Simply display device numbers as hexadecimal, using "%#jx". This is
allowed by POSIX, since it explicitly states things like the following
(example taken from ls(1)):

	"If the file is a character special or block special file, the
	size of the file may be replaced with implementation-defined
	information associated with the device in question."

This makes the output of these commands more compact. For example, ls(1)
now uses approximately four columns less. While there, simplify the
column length calculation from ls(1) by calling snprintf() with a NULL
buffer.

Don't be afraid; if needed one can still obtain individual major/minor
numbers using stat(1).
2011-09-28 18:53:36 +00:00
Eitan Adler
7d6060bd9c - add myself to calendar
Approved by:	sahil (mentor)
2011-09-28 18:49:37 +00:00
Xin LI
f13a03d89e Sync RCS id with NetBSD, this was intentionally omitted from the advisory
in order to reduce patchset size.

MFC after:	3 days
2011-09-28 18:03:53 +00:00
Chris Rees
ae7bd33eb5 Include limits.h instead of sys/limits.h to improve portability.
PR:		bin/150772
Submitted by:	Derrick Brashear <shadow@gmail.com>
Reviewed by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	cognet
2011-09-28 17:03:49 +00:00
Alexander Motin
7778ab7e0c MFprojects/hid:
Import the rest of HID improvements from the branch:
 - improve report descriptor parser in libusbhid to handle several kinds of
reports same time;
 - add to the libusbhid API two functions wrapping respective kernel IOCTLs
for reading and writing reports;
 - tune uhid IOCTL interface to allow reading and writing arbitrary report,
when multiple supported by the device;
 - teach usbhidctl to set output and feature reports;
 - make usbhidaction support all the same item names as bhidctl.

Sponsored by: iXsystems, inc.
2011-09-28 14:52:25 +00:00
Bjoern A. Zeeb
a06534c3c2 Fix handling of corrupt compress(1)ed data. [11:04]
Add missing length checks on unix socket addresses. [11:05]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-11:04.compress
Security:	CVE-2011-2895 [11:04]
Security:	FreeBSD-SA-11:05.unix
2011-09-28 08:47:17 +00:00
Dag-Erling Smørgrav
bb6e332901 Document the fact that passive mode is now the default.
Update copyright dates and strip my middle name.
2011-09-27 19:02:44 +00:00
Mikolaj Golub
29da75477b When script(1) reads EOF from input it starts spinning on zero-byte
reads eating 100% CPU. Fix this by skipping select on STDIN after
reading EOF -- permanently if STDIN is not terminal and for one second
if it is.

Also after reading EOF from STDIN we have to pass it to the program
being scripted. The previous approach was to write zero bytes into the
pseudo-terminal. This does not work because zero-byte write does not
have any effect on read. Fix this by sending VEOF instead.

Submitted by:	Ronald Klop <ronald-freebsd8@klop.yi.org>
Discussed with:	kib, Chris Torek <chris.torek@gmail.com>
Approved by:	kib
MFC after:	1 week
2011-09-27 18:14:04 +00:00
Dag-Erling Smørgrav
5c5052cca4 Use fseeko() instead of fseek(). The rest of the code is off_t-aware,
but the use of fseek() means fetch(1) can't correctly resume a transfer
that was interrupted past the 2 GB mark.

Pointed out by:	ache@
MFC after:	3 weeks
2011-09-27 17:11:31 +00:00
Dag-Erling Smørgrav
27274e81b2 Followup to r225599: the fseek() was a no-op since the file was opened
in append mode.  Open it in read-write mode instead.  Also move the
fseek up one level to cover the (unlikely but not impossible) case where
the server accepts ranges but does not send a Content-Size header.

PR:		bin/117277
MFC after:	3 weeks
2011-09-27 15:57:13 +00:00
Dag-Erling Smørgrav
a17e51c108 When resuming an HTTP download, we failed to verify that the range
returned by the server matched what we requested, and blindly appended
what we received to what we already had.  This could go two ways: if the
delivered offset was higher than expected, the local file would contain
duplicate data, while if it was lower than expected, there would be data
missing from the middle of the file.  Furthermore, if the transfer was
interrupted again, each subsequent attempt would compound the error.
Fix the first problem by restarting the transfer from scratch if there
is a gap, and the second by explicitly seeking to the correct location
in the local file so as to overwrite any duplicated data.

PR:		bin/117277
Approved by:	re (kib)
MFC after:	3 weeks
2011-09-15 22:50:31 +00:00
David Malone
ab7e59168c It seems when I added code for affine unit changes to units, I
forgot to tell the man page we could now convert Celsius to Fahrenheit.

Approved by:	re (kib)
MFC after:	1 month
2011-09-15 19:52:43 +00:00
Christian Brueffer
43fb93b0da Fix typos in error messages.
Found by:	kib
Approved by:	re (kib)
MFC after:	1 week
2011-09-13 20:35:34 +00:00
Christian Brueffer
51ad0033d6 Fix csup to allow case insensitive server names in the auth file,
just as advertised in the manpage.

PR:		158652
Submitted by:	stephen
Approved by:	re (kib)
MFC after:	1 week
2011-09-13 20:33:27 +00:00
Rick Macklem
002c2778b1 Fix nfsstat(1) so that it prints out correct stats for the
new NFS server when the "-e" option is not used. The bug was
that srvrpccnt[] was being indexed by NFSPROC_XXX when it needs
to be indexed by NFSV4OP_XXX.

Tested by:	hrs
Approved by:	re (bz)
2011-08-23 13:44:56 +00:00
Rick Macklem
806f9b4262 Fix nfsstat(1) so that it prints out correct stats for the
new NFS server when the "-w" option is used. The problem was
spotted by hrs@ during testing where srvrpcnt[] must be indexed
by NFSV4OP_XXX and not NFSPROC_XXX.

Submitted by:	hrs
Approved by:	re (bz)
MFC after:	2 weeks
2011-08-23 13:17:09 +00:00
Gabor Kovesdan
ad92276ece - Fix exclusion of directories from a recursive search
- Use FTS_SKIP for exclusion instead of custom code

Submitted by:	ttsestt@gmail.com
Approved by:	re (kib), delphij (mentor)
2011-08-17 13:58:39 +00:00
Gabor Kovesdan
dab19f3084 - Fix handling of environmental variables when they are set to empty string
Submitted by:	ttsestt@gmail.com
Approved by:	re (kib), delphij (mentor)
2011-08-17 13:56:33 +00:00
Jilles Tjoelker
54d34ff63d tail: Fix crash if -F'ed file's filesystem disappears.
If tail notices that a file it is following no longer exists (because stat()
fails), it will output any final lines and then close the file. If the read
operation also causes an error, such as when the filesystem is forcefully
unmounted, it closes the file as well, leading to fclose(NULL) and a
segmentation fault.

PR:		bin/159750
Submitted by:	swills
Approved by:	re (kib)
MFC after:	1 week
2011-08-14 13:37:38 +00:00
Robert Watson
d57486e21c Updates to libprocstat(3) and procstat(1) to allow monitoring Capsicum
capability mode and capabilities.

Right now no attempt is made to unwrap capabilities when operating on
a crashdump, so further refinement is required.

Approved by:	re (bz)
Sponsored by:	Google Inc
2011-08-14 00:42:09 +00:00
Kevin Lo
8945a9a003 catstrg() does not set the resulting string length.
PR:	bin/152549
Submitted by:	Henning Petersen <henning dot petersen at t-online dot de>
Approved by:	re (hrs)
2011-08-08 05:22:09 +00:00
Ulrich Spörlein
72baa018d0 For POLA reasons, disable SGR sequences in catpages.
See r222647 for a similar change to bsd.doc.mk after SGR was generally
turned on in groff.

Suggested by:	ru
Approved by:	re (kib)
2011-08-05 15:07:28 +00:00
Ed Maste
cf933f5bf9 Don't try to free() an address returned by mmap(). This appears to be
triggered by the same .o being included twice on the command line.

Found by:	Nima Misaghian at Sandvine
Reviewed by:	kientzle, kaiw
Approved by:	re
MFC after:	1 week
2011-08-04 14:18:09 +00:00
Ruslan Ermilov
9f0f0b4d4c Clean up markup.
Approved by:	re (kib)
2011-08-04 08:50:33 +00:00
Ulrich Spörlein
a9c153d033 Unbreak catman(1) by removing calls to col(1).
col(1) was mangling the SGR escapes and is not strictly required.

See r222647, r222648, r222650, and r222653 for more details.

Reported by:	delphij
Reviewed by:	ru
Approved by:	re (kib)
MFC after:	3 weeks
2011-08-03 19:26:57 +00:00
Ulrich Spörlein
f0720ed5f8 Fix broken mdoc.
Found by:	manlint
Approved by:	re (kib)
2011-08-01 22:21:18 +00:00
Martin Matuska
83c03ed27d Correctly link bsdcpio and bsdtar against libmd and libcrpyto
by applying the change from r221472 (libarchive).

Reviewed by:	kientzle
Approved by:	re (kib)
MFC after:	3 days
2011-08-01 08:22:40 +00:00
Alexander Motin
1bee2ec756 MFprojects/hid:
- Fix usbhidctl and usbhidaction to handle HID devices with multiple
report ids, such as multimedia keyboards.
 - Add collection type and report id to the `usbhidctl -r` output. They
are important for proper device understanding and debugging.
 - Fix usbhidaction tool to properly handle items having report_count
more then 1.

Approved by:	re (kib)
MFC after:	2 weeks
2011-07-30 13:22:44 +00:00
Michael Tuexen
2e34c19b93 Fix the following bugs related to the SCTP support of netstat:
* Correctly handle -a.
* -A isn't supported.
* Show all closed 1-to-1 and 1-to-many style sockets.
* Show all listening 1-to-many style sockets.
* Use consistent formatting for -W.

PR: 150642
Approved by: re@
MFC after: 4 weeks.
2011-07-22 16:42:12 +00:00
John Baldwin
fcc3d62fa5 Rework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'
to the maximum number of CPUs to ensure that lcpustates[] array is always
allocated to the maximum size.  Previously, if top was started without
per-CPU stats it would allocate a smaller lcpustates[] array.  When
per-CPU stats were then enabled, it would overflow the array and trash
the cpustates_columns[] array causing the CPU stats to be printed in the
wrong locations.

Approved by:	re (kib)
MFC after:	1 week
2011-07-18 21:15:47 +00:00
Bjoern A. Zeeb
c618a5222e Constantly print the command name and if set include the thread
name in per-thread mode.

Discussed with:	jhb
Obtained from:	Ed Maste at Sandvine Incorporated
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
Approved by:	re (kib)
2011-07-18 20:57:43 +00:00
Bjoern A. Zeeb
925af54487 Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
Provide backward compatibility defines under BURN_BRIDGES.

Suggested by:	jhb
Reviewed by:	emaste
Sponsored by:	Sandvine Incorporated
Approved by:	re (kib)
2011-07-18 20:06:15 +00:00
Sergey Kandaurov
8953ac4334 sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size.
That fixes vmstat -i with kvm backend.

Submitted by:	peter
Approved by:	re (kib)
2011-07-18 19:42:18 +00:00
John Baldwin
2417d97ebb - Export each thread's individual resource usage in in struct kinfo_proc's
ki_rusage member when KERN_PROC_INC_THREAD is passed to one of the
  process sysctls.
- Correctly account for the current thread's cputime in the thread when
  doing the runtime fixup in calcru().
- Use TIDs as the key to lookup the previous thread to compute IO stat
  deltas in IO mode in top when thread display is enabled.

Reviewed by:	kib
Approved by:	re (kib)
2011-07-18 17:33:08 +00:00
Attilio Rao
521ea19d1c - Remove the eintrcnt/eintrnames usage and introduce the concept of
sintrcnt/sintrnames which are symbols containing the size of the 2
  tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
  This area can be widely improved by applying the same to other
  architectures and likely finding an unified approach among them and
  move the whole code to be MI. More work in this area is expected to
  happen fairly soon.

No MFC is previewed for this patch.

Tested by:	pluknet
Reviewed by:	jhb
Approved by:	re (kib)
2011-07-18 15:19:40 +00:00
Martin Matuska
f5f8627da8 Fix accidential commit part:
Include "bsdtar_platform.h" instead of "lafe_platform.h"

MFC after:	2 weeks
2011-07-17 21:57:10 +00:00
Martin Matuska
1d9b2fdb21 Append to CPIO_SRCS instead of using TAR_SRCS,
the variable name is misleading

MFC after:	2 weeks
2011-07-17 21:52:55 +00:00
Martin Matuska
f305d4bef7 Update bsdcpio to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by:	kientzle
MFC after:	2 weeks
2011-07-17 21:42:22 +00:00
Martin Matuska
2ad1419f1b Update bsdtar to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by:	kientzle
MFC after:	2 weeks
2011-07-17 21:33:15 +00:00
Dimitry Andric
17a519f92f Upgrade our copy of llvm/clang to r135360, from upstream's trunk. 2011-07-17 19:51:40 +00:00
Doug Barton
25630ba729 bmake and other updates necessary for the BIND 9.8.x upgrade.
This includes a structural change regarding atomic ops. Previously they
were enabled on all platforms unless we had knowledge that they did not
work. However both work performed by marius@ on sparc64 and the fact that
the 9.8.x branch is fussier in this area has demonstrated that this is
not a safe approach. So I've modified a patch provided by marius to
enable them for i386, amd64, and ia64 only.
2011-07-16 11:20:54 +00:00
John Baldwin
b225f36e26 Revert 130163 and let top use KERN_PROC_PROC when individual threads are
not displayed.  The KERN_PROC_PROC sysctl was fixed in 188764.
2011-07-15 17:23:45 +00:00
Edward Tomasz Napierala
85a2f1b4f2 Rename resource names to match these in login.conf. 2011-07-14 19:18:17 +00:00
Bjoern A. Zeeb
1080a2c85d Remove semaphore map entry count "semmap" field and its tuning
option that is highly recommended to be adjusted in too much
documentation while doing nothing in FreeBSD since r2729 (rev 1.1).

ipcs(1) needs to be recompiled as it is accessing _KERNEL private
variables.

Reviewed by:	jhb (before comment change on linux code)
Sponsored by:	Sandvine Incorporated
2011-07-14 14:18:14 +00:00
Bjoern A. Zeeb
f4dad666e3 Fix indentation.
Obtained from:	Ed Maste at Sandvine Incorporated
Sponsored by:	Sandvine Incorporated
MFC after:	3 days
2011-07-14 13:47:42 +00:00
Michael Tuexen
62372898d6 Truncate link addresses like it is done for any
other address type.

MFC after: 4 weeks
2011-07-12 11:47:08 +00:00
David E. O'Brien
b0023655af If one's message is longer than the buffer size, then we reset 'cnt' at the
wrong point and the actual column # get out of sync across the buffer size.
2011-07-12 00:31:11 +00:00
Edwin Groothuis
fcc2fa496d Fix run-time breakage when encoutering invalid input-data.
PR:		bin/157718
2011-07-11 22:01:39 +00:00
John Baldwin
51f202e9ed Allow per-CPU statistics to be toggled at runtime via the 'P' key.
While here, make -P a toggle similar to other options such as -I.

Reviewed by:	arundel
MFC after:	1 week
2011-07-11 16:48:52 +00:00
Edwin Groothuis
608be0d0ba Fix typo in order of markup and text. 2011-07-11 10:42:36 +00:00
Edwin Groothuis
f379d691e5 ncal(1) highlights the current date (or a date provided via parameter)
even if stdout is not a tty. If stdout is not a tty the data is
normally processed by other tools and no control sequences are
expected.

PR:		bin/158580
MFC after:	1 week
2011-07-11 10:41:08 +00:00
Edwin Groothuis
5a5bcf88e4 Fix the interpreter for:
Jul/Sat+3       Every third saturday of July - Jul/Sat+3

which was able to be done via:

Jul/SatThird	Every third saturday of July - Jul/SatThird

Add interpreters for:

SatFourth	Every third saturday of each month - SatFourth
Sat+4           Every third saturday of each month - Sat+4
Sat 		Every saturday of each month - Sat

MFC after:	2 weeks
2011-07-11 08:24:36 +00:00
Xin LI
7c9acc776a peeraddr is only used in sizeof() evaluations, so instead of declaring it
a variable, use typedef.

MFC after:	1 month
2011-07-11 05:57:49 +00:00
Xin LI
8dc79f22fa Use %zu when printing size_t.
MFC after:	1 month
2011-07-11 05:50:24 +00:00
Xin LI
d1d6559b08 Match size_t and ssize_t by using %zu and %zd instead of %d.
MFC after:	1 month
2011-07-11 05:46:15 +00:00
Xin LI
a2d5d610cb Use a pair of parentheses to ensure right evaluation order. 2011-07-11 05:40:46 +00:00
Xin LI
682b64839a Use strlcpy().
MFC after:	1 month
2011-07-11 05:31:52 +00:00
John Baldwin
034b7b80b2 Always skip the kernel idle process if requested, it is not specific to
the 'CPU' mode.

PR:		bin/158677
Reported by:	arundel
MFC after:	3 days
2011-07-07 13:37:46 +00:00
Ed Schouten
21632754d6 Only print entries for which ut_host points to a character device.
Now that we use utmpx, we more often have entries for which the ut_line
is left blank. To prevent us from returning struct stat for "/dev/",
check that the resulting stat structure belongs to a character device.
2011-07-05 14:12:48 +00:00
Sergey Kandaurov
2f39985f00 Fix quota(1) output.
- Fix calculation of 1024-byte sized blocks from disk blocks shown when -h
option isn't specified. It was broken with quota64 integration.
- In prthumanval(): limit the size of a buffer passed to humanize_number()
to a width of 5 bytes but allow a shorter length if requested. That's what
users expect.

PR:		bin/150151
Reviewed by:	Kirk McKusick
2011-06-30 09:20:26 +00:00
Sergey A. Osokin
877854f667 Remove needless file due to Russia scraps DST in 2011. 2011-06-28 12:32:24 +00:00
Tim Kientzle
79f67f37a7 The --newer-than test should descend into old
directories to look for new files.

PR:		bin/150890
Submitted by:	Tobias Herre
MFC after:	3 weeks
2011-06-26 17:54:11 +00:00
Joel Dahl
afd03ac8b0 More accurate birthplace. 2011-06-25 19:21:54 +00:00
Tim Kientzle
674e7c4cfd If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

PR:		bin/154407
2011-06-25 16:27:49 +00:00
Kevin Lo
aa7e4bb466 Remove duplicated header files 2011-06-24 07:18:44 +00:00
Craig Rodrigues
f6c506d9cf Acknowledge Edwin Groothuis for the major rewrite he
did of the tftpd and tftp code to support TFTP blocksize.
2011-06-24 05:41:38 +00:00
Craig Rodrigues
fcaab598e0 Update references to RFC's that the newer TFTP implementation supports. 2011-06-22 23:26:04 +00:00
Craig Rodrigues
b68628c826 Bump date.
Document the following commands which were added in the new TFTP implementation:
blocksize, blocksize2, packetdrop, options, rollover
2011-06-22 22:55:51 +00:00
Xin LI
71024a974d Eliminate unneeded headers. 2011-06-21 20:44:06 +00:00
Xin LI
b561579962 Remove unneeded headers.
MFC after:	2 weeks
2011-06-21 20:36:10 +00:00
Xin LI
cde9717b67 Staticify cleanup() which is not referenced in other places.
MFC after:	2 weeks
2011-06-21 20:33:55 +00:00
Gavin Atkinson
cc361f6598 Merge tnftp-20100108 from the vendor branch into head.
PR:		bin/112288 bin/120256 bin/129014 bin/145528
MFC after:	1 month
2011-06-20 08:00:32 +00:00
Jilles Tjoelker
1696274411 fuser: Fix skipping "SIG" on signal names (-s).
The code did  !strncasecmp(str, "sig", 4)  which is not useful.

Also change "sig" to "SIG" matching the uppercase signal names as of
r218285. This has little effect because fuser does not enable locale.
2011-06-18 21:53:36 +00:00
Ben Laurie
5f301949ef Fix clang warnings.
Approved by:	philip (mentor)
2011-06-18 13:56:33 +00:00
Ed Schouten
c3f1b3ae09 Let the size of the namebuf depend on the size of the ut_user field. 2011-06-18 07:47:15 +00:00
Ed Schouten
9f0c9022c2 Add WITHOUT_UTMPX switch to the build system.
This knob removes the tools that are exclusively used to view and
maintain the databases maintained by utmpx, namely last, users, who,
wtmpcvt, ac, lastlogin and utxrm.

The tool w is not in this list, because it has some other functionality
which is unrelated to utmpx; it is hardlinked to the uptime tool.
2011-06-17 21:30:21 +00:00
Alexander Leidinger
b66e74b695 Add 2-clause BSD license.
Approved by:	David Kirchner <dpk@dpk.net> (initial author)
Requested by:	Otto Moerbeek <otto@drijf.net>
MFC after:	1 week
2011-06-17 06:12:28 +00:00
Craig Rodrigues
e5660633d3 Clarify that the TFTP blocksize (RFC2348) or non-standard
TFTP rollover option can be used to transfer larger files.
2011-06-16 02:27:05 +00:00
Craig Rodrigues
f4b7e64d7a Specify correct RFC2347 for TFTP options in diagnostic message. 2011-06-16 02:16:53 +00:00
Tai-hwa Liang
6ab780e5f0 Using statfs.f_fstypename rather than statfs.f_type whilst performing fstype
comparsion as nullfs will copy f_type from underlayer FS.

PR:		bin/156258
Submitted by:	Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
MFC after:	1 month
2011-06-13 05:22:07 +00:00
Dimitry Andric
bd5abe1968 Upgrade our copy of llvm/clang to r132879, from upstream's trunk. 2011-06-12 18:01:31 +00:00
Gabor Kovesdan
69a6d1985d - Use REG_NOSUB to bypass submatch counting when not necessary. This may
yield in somewhat better performance in a few cases.

Approved by:	delphij (mentor)
2011-06-12 12:51:58 +00:00
Gabor Kovesdan
cbe6b9e50f - Fix -w behavior
- Make -F and -w work together
- Fix --color to colorize all of the matches

PR:		bin/156826
Submitted by:	Yuri Pankov <yuri.pankov@gmail.com>
Approved by:	delphij (mentor)
2011-06-12 12:44:02 +00:00
Chris Rees
63ddf8edfe Add self to calendar
Approved by:	rene (mentor)
2011-06-11 21:26:12 +00:00
Julien Laffaye
d3edd193e0 - Add myself to calendar.freebsd
- Add the forgotten relation to mentors in committers-ports.dot

Approved by:	bapt@ (mentor)
2011-06-07 09:06:15 +00:00
Ed Schouten
48a16a34d8 Remove redundant assignments to WARNS.
For these directories, WARNS is already implied to be 6.
2011-06-06 20:24:17 +00:00
Glen Barber
b6654957c3 Attempt to clear up some confusion in the following example, by stating
the '-c' argument is passed to the shell, not to su(1), which would
indicate the login class.

	'su -m <user> -c <command>'

Submitted by:	Warren Block <wblock@wonkity.com> (followup to 157078)
MFC after:	5 days
2011-06-06 19:33:19 +00:00
Dmitry Chagin
27242311a3 Fix regex for ptraceopname().
PR:		bin/157663
Submitted by:	jason wright <jason@thought.net>
MFC after:	10 days
2011-06-06 19:00:38 +00:00
Glen Barber
a53dafae57 Bump date from previous commit. :(
MFC after:	5 days
2011-06-06 15:21:53 +00:00
Glen Barber
4af4a110a7 Document that when running 'su -m <user> -c <command>', <command> is run
within a shell as <user>.

PR:		157078
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	5 days
2011-06-06 15:17:55 +00:00
Jaakko Heinonen
0aa7541b66 Pass correct size to write(2).
PR:		bin/155915
Submitted by:	John Levine
MFC after:	2 weeks
2011-06-06 13:50:29 +00:00
Jilles Tjoelker
535d7745a8 find: Exit if there is an unknown option.
Ignoring the parameter with the unknown options is unlikely to be what was
intended.

Example:
  find -n .

Note that things like
  find -n
already caused an exit, equivalent to "find" by itself.
2011-06-04 21:59:55 +00:00
Ruslan Ermilov
a6a3e8561d When MANCOLOR environment variable is set, enable ANSI color escapes
in grotty(1).  This makes it possible to view colorized manpages in
color.

When MANPAGER environment variable is set, use it instead of PAGER.

Why another environment variable, one might ask?  With color output
enabled, both a terminal and a pager should support the ANSI color
escapes.  On a supporting terminal, less(1) with option -R would be
such a pager, while "more -s" (the current default pager for man(1))
will show garbage.  It means a different default pager is needed when
color output is enabled, but many people have PAGER set customary,
and it's unlikely to support ANSI color escapes, so introducing yet
another variable (MANPAGER) seemed like a good option to me:

- if MANPAGER is set, use that unconditionally;

- if you disable color support (it is by default), and don't set
  MANPAGER, you get an old behavior: -P pager, $PAGER, "more -s",
  in that order;

- if you enable color support (by setting MANCOLOR), and don't set
  MANPAGER, we ignore PAGER which is unlikely to support ANSI color
  escapes, and you get: -P pager, "less -Rs", in that order;

- you might have good reasons for different man(1) and general
  purpose pagers;

- later versions of GNU man(1) support MANPAGER.
2011-06-03 14:34:38 +00:00
Ruslan Ermilov
b70e20257c Don't use col(1) since grotty(1) never outputs reverse line feeds,
and because col(1) mangles ANSI color escapes if enabled.  Spaces
to tabs compression is now done by passing -h to grotty(1).

Discussed with:	uqs
2011-06-03 13:45:11 +00:00
Ruslan Ermilov
a1528c80a5 Trim more when parsing MANCONFIG directive. 2011-06-03 05:56:52 +00:00
Ruslan Ermilov
1030a67f5b Typo. 2011-06-03 05:16:54 +00:00
Ruslan Ermilov
a00944499f Added support for the MANWIDTH environment variable:
If set to a numeric value, used as the width manpages should be
displayed.  Otherwise, if set to a special value ``tty'', and
output is to a terminal, the pages may be displayed over the
whole width of the screen.
2011-06-03 05:16:33 +00:00
Ulrich Spörlein
3d12096812 Fix man -t by not passing grotty flags to groff when grotty is not
involved.

This fixes a regression introduced with r221303.

Noticed by:	jilles
2011-06-02 10:18:49 +00:00
Ulrich Spörlein
135bce2a9e mdoc: reorder sections consistently 2011-06-02 09:56:53 +00:00
Ulrich Spörlein
b2e52ced25 mdoc: fix markup 2011-06-02 09:56:42 +00:00