Commit Graph

11548 Commits

Author SHA1 Message Date
roy ff10397929 Use memmove as we are effectively moving memory from left to right so
that the use=foo capability is removed when merging foo.
2011-11-03 10:12:57 +00:00
pgoyette eb11ed074e Fix a couple of mis-spellings of "descriptions" 2011-11-02 19:21:49 +00:00
yamt 29af9462d1 annotate for lint 2011-10-31 13:27:51 +00:00
jym 16bd08511a Move getuid() out of the loop, uid should not change behind our back. KNF. 2011-10-25 23:45:19 +00:00
jym a960d51308 kill(2) might not be a good test after all, users can send signals
to setuid binaries (like SIGINT for ping(8)). So apply the exact same
rights as procfs, and test uid against proc p_uid (real owner of process).

Bail out if we are not root and we attempt to print mappings of a process
that the user does not really own.
2011-10-25 22:13:22 +00:00
joerg 10769988ef Add support for build as part of the toolchain. Add option for
deterministic output (-p), which replaces the random seed with a
incremental counter.
2011-10-21 23:47:11 +00:00
christos 924cacedb8 Remove stale proc_compare code and use the shared one in libutil. 2011-10-21 02:26:09 +00:00
reed 08dba12376 patch from from Snader_LB via IRC.
- mention  "The following options are available:"

- improve grammar

- provide useful tip about -x
2011-10-19 00:27:40 +00:00
jym 9bea009cb1 Disallow printing of kernel mappings if we are not root.
pid 0 is a special case for kill(pid, 0), and unlikely to be the
correct test there. This follows the procfs "mem" rights changes that
happened some time ago.
2011-10-18 20:54:56 +00:00
mbalmer 2790b28f0e Fix typo in comment. 2011-10-17 16:31:14 +00:00
christos 81aad1d7e8 use warn instead of perror. 2011-10-15 21:59:48 +00:00
christos 76f57a76c2 unbreak -f -H -h, etc, part 1
- get nlist once in the beginning and fix the flags. Not each time! It is
not like the kernel will change it symbols in the middle of the run.
2011-10-15 21:06:05 +00:00
mbalmer a51a64158b Add towns to dmr's dates. 2011-10-13 07:44:27 +00:00
mbalmer 67aae85cd8 Dennis "dmr" Ritchie R.I.P. 2011-10-13 07:41:32 +00:00
wiz e6c49c32de More standard Dt/Nm. 2011-10-11 20:39:40 +00:00
christos 08c23328c8 make getcap a link to getent, since many of the databases we use are of the
"cap" format.
2011-10-11 19:25:07 +00:00
christos 5345ba7f3a fix usage formatting. 2011-10-11 19:24:43 +00:00
tsutsui 077be3445f Consistently use "%#"PRIxVADDR to print VA, not "0x%#"PRIxVADDR
or "0x%"PRIxVADDR etc.  Noticed by Y.Sugahara.
2011-10-11 12:25:56 +00:00
chs 585f34003b fix rdev reporting for UFS2 and ext2fs. 2011-10-09 21:16:00 +00:00
jnemeth e894be756a add an xref to fstat(2) 2011-10-08 22:16:03 +00:00
wiz d2edac91a8 Fix Dt argument. Correct date. Some wording improvements. 2011-10-08 20:19:10 +00:00
christos 582bebaa0f fix markup 2011-10-08 19:20:50 +00:00
christos 07fb1a358e descend into cleantags 2011-10-08 19:16:54 +00:00
christos 830d5efd84 Small script used when importing 3rd party programs. The code in this
script is used in many foo2netbsd scripts, but none of them has the
complete list of keywords. I will make all those scripts use this one
instead.
2011-10-08 19:16:08 +00:00
christos 1dcb02d8c7 remove casts 2011-10-07 16:30:17 +00:00
mbalmer 947c965b88 Refer to X11R7. 2011-10-07 10:52:31 +00:00
joerg 26c79d78b3 Simplify 2011-10-07 10:14:22 +00:00
mrg 92461b24a3 enable building/installing audiocfg(1). ok jmcneill. 2011-10-06 07:38:54 +00:00
roy 47e1ece0c2 Use terminfo and the non-standard ttytype rather than termcap. 2011-10-05 10:48:54 +00:00
shattered 8836963d2f PR/43968 -- add 'segqlen' of TCPCB to 'netstat -P'.
OK by wiz@
2011-10-04 21:12:40 +00:00
christos c6a6b07331 Handle c99 declarations in the middle of blocks. 2011-10-04 16:19:59 +00:00
roy 26bd22ac44 Ensure we only pass cap names of one or two characters to tgetstr
and friends so we don't mistakenly try and convert a terminfo code to a
termcap code.
2011-10-04 12:23:14 +00:00
roy 9f4db5a1ea tput now uses longname(3) to derive the terminal description instead
of trying to parse it from termpcap.
Fixes PR/43386.
2011-10-04 11:02:32 +00:00
roy 4060cbcd0c Use tiparm instead of vtparm. 2011-10-03 12:32:15 +00:00
christos 0e4108c639 eat the last d in double constants. 2011-10-02 19:45:10 +00:00
dholland 81e8d7471a Describe the output more accurately, and in the correct order. Noted by
Snader_LB on freenode.
2011-10-02 01:51:00 +00:00
dholland 1e6da30b2e Fix ambiguous/confusing wording. 2011-10-02 01:47:27 +00:00
jym afca4e3b49 Fix an implementation inconsistency with the prop_*_send_syscall() and
prop_*_recv_syscall() functions from proplib(3). They now share the
same logic as the one from prop_*_send_ioctl() functions:
- returns an int
- 0 indicates "no error", otherwise returns the error number (and
set errno)

Many consumers of the prop_*_{ioctl, syscall} expect errno to be set
on error and use err() to display the error message. As such, ensures that
errno gets set before returning from these functions.

prop_*_send_syscall() functions returned a boolean, and now return an int.
Fix all call sites to use the new paradigm (only quota2 is affected in src).

As the prop_*_{send,recv}_syscall() API appeared in -current and is only
used by the recent quota2 code, I am not bumping the lib. The API change
only affects the prop_*_send_syscall() function (recv_syscall()s were
already used correctly), so ensure you are not mixing "old" -current
quota binaries with a new proplib(3) (or the other way around). This
change will be announced via a HEADS-UP and UPDATING.

Does not affect the kernel part of proplib.

Document the correct API in prop_array(3) and prop_dictionary(3).

Thanks to Francois Tigeot for noticing the API inconsistency and
reporting it on tech-kern@.

ok bouyer@.
2011-09-30 22:08:18 +00:00
christos 22d49ff4f1 add copyright 2011-09-30 01:32:21 +00:00
sjg 123e6558cd Make sure .PHONY targets get .TARGET set.
This wasn't happening when a dependency of .END.
Set .PREFIX too and add a unit-test.

PR: 43534
2011-09-29 23:38:04 +00:00
christos 190c081319 don't limit sockets to sizeof(sizeof sockaddr_storage). We can create valid
sockaddr_un sockets that exceed that. Arguably either
sizeof(struct sockaddr_storage) should be amended, or we should disallow
unix domain sockaddrs that exceed that size.
2011-09-28 16:28:27 +00:00
apb aaffb7873e Updates to the find(1) man page, based on PR 45381 from Greg Woods,
with additional changes by myself.
2011-09-24 13:45:43 +00:00
mrg 81a1075469 apply some (uintptr_t) so that printing printers works on i386 (likely
all 32 bit.)
2011-09-23 07:31:39 +00:00
apb 64d2b8e0ba Use vis(3) encoding when a string format is modified by the '#' flag.
Also bump copyright years.
2011-09-22 20:23:55 +00:00
christos a0af16e360 - factor out common code in the inet and inet6 printing.
- add appletalk (ddp) support.
2011-09-22 17:27:50 +00:00
christos 8624929e77 Fix unchecked malloc, check for overflow (Maksymilian Arciemowicz)
While here, remove unused casts, fix types.
2011-09-22 12:49:57 +00:00
christos 17c41f8e0c Symbolic printing of some known MISC records. 2011-09-21 17:48:51 +00:00
christos 618434e41f PR/45385: Henning Petersen: Swapped arguments in lseek 2011-09-21 14:33:35 +00:00
christos 48adc0d0fe PR/45384: Henning Petersen: Swapped arguments in lseek 2011-09-21 14:32:14 +00:00
christos 6f2c981e29 PR/45383: Henning Petersen: Swapped lseek args 2011-09-21 14:30:47 +00:00