Jilles Tjoelker
6530d2f2d5
du: Allow multiple -HLP options, the last one wins.
...
This matches 4.4BSD tradition and other utilities with these options and is
required by POSIX (POSIX does not specify -P, only -HL).
MFC after: 2 weeks
2011-12-17 23:18:14 +00:00
Dimitry Andric
d88ccef562
Revert r228650, and work around the clang false positive with printf
...
formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to
the Makefile instead.
MFC after: 1 week
2011-12-17 22:32:00 +00:00
Dimitry Andric
be120ddea0
In usr.bin/csup/auth.c, cast time_t to intmax_t instead, and use the
...
corresponding printf length modifier.
Requested by: mdf
MFC after: 1 week
2011-12-17 22:20:46 +00:00
Dimitry Andric
b7de4fa0d3
In usr.bin/vmstat/vmstat.c, cast several printf field widths to int, and
...
use printf format specifiers from inttypes.h for uint64_t's.
MFC after: 1 week
2011-12-17 19:22:24 +00:00
Dimitry Andric
cb3b0d8fb9
Unfortunately, clang gives warnings about sendmail code that cannot be
...
turned off yet. Since this is contrib code, and we don't really care
about the warnings, just turn make them non-fatal for now.
MFC after: 1 week
2011-12-17 18:39:04 +00:00
Dimitry Andric
288fcda320
In usr.bin/netstat/atalk.c, work around a clang false positive with
...
printf format warnings and conditional operators.
MFC after: 1 week
2011-12-17 17:21:47 +00:00
Dimitry Andric
d411ccb3b2
Use NO_WCAST_ALIGN for usr.bin/ncplist, as there are many potential
...
alignment issues in it. (Though I doubt anyone still cares about
NetWare support...)
MFC after: 1 week
2011-12-17 17:04:30 +00:00
Dimitry Andric
081aa5169d
In usr.bin/mail/cmd1.c, use the correct printf length modifier for a
...
ptrdiff_t. In usr.bin/mail/main.c, cast a field width to int.
MFC after: 1 week
2011-12-17 16:30:42 +00:00
Dimitry Andric
f7c0d4c7ea
In usr.bin/indent/io.c, fix a few warnings about format strings not being literals.
...
MFC after: 1 week
2011-12-17 15:41:58 +00:00
Dimitry Andric
7818f8df2e
Correct a logic error in usr.bin/hexdump/conv.c, found by clang.
...
Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead. It also sets p to peekbuf, to indicate it is still
processing the incomplete character.
However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.
Fix this by comparing against p instead, which was the intention. Also
turn peekbuf into an array of u_char, to prevent conversion warnings.
MFC after: 1 week
2011-12-17 15:33:26 +00:00
Dimitry Andric
7853817de3
More fixes for correct printf length modifiers usr.bin/gprof.
...
MFC after: 1 week
2011-12-17 14:51:24 +00:00
Dimitry Andric
d16752d1ae
In usr.bin/gprof/aout.c, use the correct printf length modifier for a
...
uint32_t.
MFC after: 1 week
2011-12-17 14:37:41 +00:00
Dimitry Andric
f666b9058d
In usr.bin/csup/proto.c, use the correct printf length modifier to print
...
an off_t.
MFC after: 1 week
2011-12-17 13:52:53 +00:00
Dimitry Andric
582ad8aebf
In usr.bin/csup/auth.c, use the correct number of bytes for zeroing the
...
shared secret, and use long long format to snprintf a time_t.
MFC after: 1 week
2011-12-17 13:14:44 +00:00
Dimitry Andric
f3fbaba136
In usr.bin/mt/mt.c, the c_code member of struct commands should really
...
be an unsigned long, since it will contain values of ioctl request
codes. On 64-bit arches, these will not fit into an int.
MFC after: 1 week
2011-12-17 02:23:30 +00:00
Dimitry Andric
940695fffb
In usr.bin/tar/tree.c, if you really want to poke to NULL, you must use
...
volatile, otherwise the indirection will not be emitted.
MFC after: 1 week
2011-12-17 01:36:50 +00:00
Max Khon
94f176ebd4
Revert r228521: sometimes job output is lost
...
(see tools/regression/usr.bin/make/execution/joberr test).
openpty(fd + 0, fd + 1,...) version does not have this problem but
it sometimes enters an infinite sleep in "ttywait" state in tty_drain()
when make(1) closes slave pty.
2011-12-15 06:25:19 +00:00
Max Khon
366cd46cbe
job make: if stdout is a tty create a pty when running a command.
2011-12-15 03:13:23 +00:00
Ed Schouten
f6ab8089c6
Replace __const by const in all non-contributed source code.
...
As C1X is close to being released, there is no need to wrap around a
feature that is already part of C90. Most of these files already use
`const' in different placed as well.
2011-12-13 13:32:56 +00:00
Mikolaj Golub
cc1ff620b9
Make 64-bit procstat output ELF auxiliary vectors for 32-bit processes.
...
Reviewed by: kib
MFC after: 1 week
2011-12-12 22:01:33 +00:00
Mikolaj Golub
de21500d6a
Make procstat -l output similar to the output of limits(1).
...
Suggested by: jhb
MFC after: 1 week
2011-12-12 21:41:05 +00:00
Ed Schouten
a02c83afc5
Add more static keywords to truss(1) source code.
...
There are some tables in the source code that are only used by the
individual source files themselves. Therefore there is no need to export
them.
2011-12-10 18:27:55 +00:00
Ed Schouten
8375d51296
Add missing "static const" to long options table.
...
This table is only used in this C file and passed to getopt_long(), so
we can safely add static and const to it.
2011-12-10 18:21:03 +00:00
Ed Schouten
516c8ed9dd
Replace char copyright[] by static const char copyright[].
...
It seems the latter is used throughout the tree.
2011-12-10 18:11:06 +00:00
Glen Barber
653fa5218a
Update du(1):
...
- Sort arguments alphabetically where appropriate
- '-B blocksize' is not mutually exclusive of '-h|-k|-m'
- Mention '-t' in synopsis
- Other wording improvements
- Update usage() output to reflect the new synopsis [1]
- Other miscellaneous improvements
PR: 162438
Submitted by: arundel
Reviewed by: Benjamin Kaduk (kaduk ! mit.edu), jhb[1] (original version)
MFC after: 1 week
2011-12-09 02:30:56 +00:00
Gabor Kovesdan
6f4cbf7cb3
- Match GNU behavior of exit code
...
- Rename variable that has a different meaning now
PR: bin/162930
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 1 week
2011-12-07 12:25:28 +00:00
Mikolaj Golub
cc43fe5b46
Don't output a warning if kern.proc.auxv sysctl has returned EPERM.
...
After r228288 this is rather a normal situation.
MFC after: 1 week
2011-12-05 19:39:15 +00:00
Konstantin Belousov
97695ad4cd
Use explicit information from the kernel to detect the traps due to
...
syscall entry and leave.
Based on submision by: Dan Nelson <dnelson allantgroup com>
MFC after: 1 month
2011-12-04 18:43:09 +00:00
Max Khon
019bd13977
- Fix segmentation fault when running "+command" when run with -jX -n due
...
to Compat_RunCommand() being called with `cmd' that is not on the node->commands
list
- Make ellipsis ("..." command) handling consistent: check for "..." command
in job make after variables expansion to match compat make behavior
- Fix empty command handling (after variables expansion and @+- modifiers
are processed): now empty commands are ignored in compat make and are not
printed in job make case
- Bump MAKE_VERSION to 5-2011-11-30-0
2011-11-30 18:07:38 +00:00
Gabor Kovesdan
68f42e1da4
- Create links to the xz and lzma versions even if BSD grep is not the
...
default. Nor GNU nor liblzma in base provides such functionality so
it may be useful.
MFC after: 3 days
2011-11-28 20:16:55 +00:00
Gabor Kovesdan
ede01be2f2
- Call warnx() instead of errx() if a directory is not readable when using
...
a recursive search. This is the expected behavior instead of aborting.
PR: bin/162907
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 3 days
2011-11-28 20:04:26 +00:00
Gabor Kovesdan
f0c94259d6
- Fix behavior of --null to match GNU grep
...
PR: bin/162906
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 3 days
2011-11-28 20:00:31 +00:00
Mikolaj Golub
447fdbd073
Update SYNOPSIS to include the flags added recently.
...
Spotted by: jhb
2011-11-28 19:45:47 +00:00
Baptiste Daroussin
a841e1ebe6
Synchronize with laster version of m4 from OpenBSD and NetBSD
...
This bring better compatibility with gnum4
Reviewed by: cognet
Approved by: cognet
Obtained from: OpenBSD, NetBSD
2011-11-28 13:32:39 +00:00
Mikolaj Golub
6bfefd99ce
Cast a_val on printing. This fixes build on mips.
2011-11-28 07:09:29 +00:00
Mikolaj Golub
d3c10c5235
Make proctstat -x output more readable.
...
This also fixes the issue, spotted by mdf, with values that were
printed as decimal and had hex prefixes.
Discussed with: kib, rwatson
MFC after: 2 weeks
2011-11-27 15:53:58 +00:00
Mikolaj Golub
598585e835
usr.bin/procstat
...
Add -l flag to display resource limits.
PR: bin/161257
Reviewed by: kib
MFC after: 2 weeks
2011-11-24 20:54:06 +00:00
Mikolaj Golub
7294321939
Fix build, hopefully.
...
Reviewed by: kib
2011-11-23 07:34:09 +00:00
Mikolaj Golub
e99272c732
Add new options, -e and -x, to display process environment variables
...
and ELF auxiliary vectors.
MFC after: 2 weeks
2011-11-22 20:59:52 +00:00
Warner Losh
34b7df97a3
Add helpful clarification text. While not strictly necessary, these
...
few words make this man page much easier to understand without
re-reading prior parts of the man page.
2011-11-16 22:02:59 +00:00
Eitan Adler
14517324d0
- add a missing "be" and "in"
...
- fix other errors introduced when committing r226436
- add 'function' to a sentence where it makes sense
Submitted by: delphij
Submitted by: dougb
Submitted by: jhb
Approved by: dougb
Approved by: jhb
2011-11-11 22:27:09 +00:00
Greg Lehey
415f031163
Tidy up command line processing:
...
- Add ? option to optstring.
- Sort options alphabetically.
- Vertical space.
Tidy up usage() function.
Bring man page in sync with source.
Ensure that debug code is only executed with the -d option.
Submitted by: Christiane Yeardley
2011-11-09 01:40:46 +00:00
Mikolaj Golub
729bfad6a4
Bumb date after r227317.
...
Reminded by: pluknet
2011-11-08 19:14:15 +00:00
Ed Schouten
66c5875a45
Simplify getopt switch parsing.
...
Only one of these flags can be set. Just add them together and check the
value. Also, get rid of the listall variable. The code is already filled
with direct *flag-comparisons.
Obtained from: Alexander Best (though modified)
2011-11-08 11:36:46 +00:00
Mikolaj Golub
82841ae6f8
When displaying process virtual memory mappings print superpage
...
mapping flag.
Submitted by: Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
Reviewed by: alc, rwatson
2011-11-07 21:16:19 +00:00
Ed Schouten
0c66031ab1
Remove unneeded CFLAGS.
...
Such optimisations should not be performed in this Makefile. Also, uqs@
suggested they have no effect, because the checksum of the resulting
binary is unchanged.
Discussed with: gabor, uqs
2011-11-07 09:42:22 +00:00
Ed Schouten
a35353de88
Partially revert r227233.
...
The privs.h header is not only used by at(1), it's also used by
atrun(8). Just let the code the way it used to be (for now).
Reported by: kwm, tinderbox
Hat to: me
2011-11-06 20:30:21 +00:00
Ed Schouten
641835f465
Mark global functions and/or variables in xstr(1) static where possible.
...
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:39 +00:00
Ed Schouten
e5ec905575
Mark global functions and/or variables in whois(1) static where possible.
...
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:33 +00:00
Ed Schouten
94cd938578
Mark global functions and/or variables in which(1) static where possible.
...
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:26 +00:00