Commit Graph

11296 Commits

Author SHA1 Message Date
yamt 5ec575268f update usage 2011-02-05 15:22:17 +00:00
mlelstv 1d04f1ffaf dosum also needs getnlist 2011-02-05 13:12:07 +00:00
christos c93e02df25 fix tools build. Why doesn't .PARSEDIR work? 2011-02-05 03:09:46 +00:00
christos 759a394557 generate ops table dynamically. Will move the other table from tree.c there
too.
2011-02-04 23:32:44 +00:00
christos 15f35154fe fix typo 2011-02-04 23:31:23 +00:00
pooka 74135a6c04 Allow to specify -d hostpath offset,size with disklabel. 2011-02-04 20:06:23 +00:00
roy 0ce325d8e4 Work with the new routing. 2011-02-04 15:09:22 +00:00
martin 82fe9809af Use RT_ROUNDUP() and friends from sys/route.h instead of homegrown
variants.
2011-02-04 14:31:23 +00:00
wiz 3e5e970356 Fix typo, from Henning Petersen in PR 44510. 2011-02-04 07:26:17 +00:00
pooka a9061c30c5 Create backing image with mode 0644 instead of 0755 & document this. 2011-02-03 11:25:27 +00:00
pooka 53c3cffec5 whoopsie, bump date 2011-02-03 11:21:43 +00:00
pooka ed37916e33 * make it possible to specify an offset in -d
* truncate -d hostpath only if it's a regular file and smaller
  than offset+size
2011-02-03 11:21:16 +00:00
chuck e2bf3ae6ea udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.

no functional change with this commit.
2011-02-01 20:58:15 +00:00
matt 4d5d6d9aa5 Add a new AF/PF_ROUTE which is 64-bit clean which makes the routing socket
interface (and its associated sysctls) act identically for both 32 and 64 bit
programs.  The old unclean one remains for backward compatibility.
2011-02-01 01:39:19 +00:00
christos 50e452f9f7 deal with detecting the first and last cpu differently. 2011-01-31 19:41:19 +00:00
matt c1edd37ce1 Make sure to getnlist in dovmstat 2011-01-31 18:56:04 +00:00
matt b86170a11c Add mips/mips64 support. 2011-01-31 03:37:28 +00:00
matt 45362e3914 Defer nlist processing until we know we need to it. If everything can be
obtained via sysctl, we can skip it entirely.  This means we can run even
if not setgid.

getuptime will now use sysctl/clock_gettime if memf is NULL.
doevcnt now sues sysctl(kern.evcnt) is memf is NULL.  It falls back to
groveling if sysctl returns an error of ENOENT.
dointr will call doevcnt to evcnt based intr stats.
2011-01-29 18:10:08 +00:00
pooka 6475f12521 support rump.sockstat 2011-01-28 18:52:48 +00:00
pooka 1dbf3ca8e4 Check sys_reboot() return value now that it's possible. 2011-01-22 13:43:07 +00:00
wiz 6792460beb New sentence, new line. 2011-01-21 09:47:00 +00:00
pooka e963960681 Add a simple dhcp client for rump kernels. It uses code from dhcpcd
for talking to the server and for setting the interface address
and route.  However, otherwise it is quite different, since we need
to be working under the assumptions that there is no stable storage
on a rump instance, and that there are n networking stacks on a
given host.
2011-01-20 18:47:19 +00:00
ginsbach b4abf20d50 - Fix an incorrect comparison (always true)
This created an unnecessary temporary file when using the -o option
  to create a new file.

- Fix -o option bug reported by Tony Finch
  The output file was incorrectly called "[stdin]" when overwriting
  the the input file via standard in (unifdef -o file < file).
2011-01-20 15:24:24 +00:00
matt 1d4bb1d8f6 Change mips64 to use a 16 byte long double. 2011-01-18 08:30:10 +00:00
christos 003dddff9d PR/44235: Valeriy E. Ushakov: Don't pick up a block from the free list if
it is not big enough, allocate a new one. XXX: this is inefficient, but at
least it does not end up corrupting memory.
2011-01-17 03:04:10 +00:00
njoly d1860447da Do not crash if a date cannot be represented (localtime returning
NULL), use the Epoch value instead.
2011-01-15 22:54:10 +00:00
wiz e7d1c4c49a Fix spelling, mark up NULL. Closes PR 44381 by Ryo HAYASAKA. 2011-01-14 14:21:36 +00:00
wiz 1831df68c2 Sort options in SYNOPSIS. 2011-01-12 19:55:06 +00:00
wiz 2164f8a67d Fix xref. 2011-01-12 19:53:12 +00:00
christos d1cb59540a fix usage. 2011-01-12 18:51:42 +00:00
christos 1a231f468f add -s option to compress spaces. 2011-01-12 18:28:19 +00:00
pooka fca51725c2 shmif(4) bus dumping utility 2011-01-12 16:14:24 +00:00
wiz 2f3e33b8d2 Spell out parenthesis. From Ryo HAYASAKA in PR 44372. 2011-01-12 06:17:52 +00:00
dyoung c45c4e89a1 Rename sigqueue to sigq to avoid clashing with sigqueue(2). Now this
builds again.
2011-01-10 17:14:38 +00:00
christos f64bac8a30 format SI_QUEUE properly. 2011-01-10 05:15:17 +00:00
pooka 3c2830fb5d BUGS is gone (and on its way out it inquired about the doctor's status) 2011-01-08 09:36:26 +00:00
dholland 78dfa763ff fix typo, from Ryo HAYASAKA in PR 44332. 2011-01-06 08:30:09 +00:00
dholland f4f54a9c39 Fix "-exec blah blah {} +" so it only matches when the {} is last, as
per the standard. Per (brief) discussion on tech-userlevel.

There should really be a form where you can do the equivalent of
"-exec blah {} blah +", but I think we're going to need to call it
something other than -exec. As it is it's sort of surprising that the
standards people didn't add a different name -- note what happens if
you try to do something like "find ... -exec expr {} + 2 \;".
2011-01-06 08:18:42 +00:00
apb 71bcc2da8f Add an example of generating a list of integers; make it the first
example.  Also add a reference to seq(1).
2011-01-05 19:59:48 +00:00
wiz 23e235307b Fix usage (8th bit begone!) 2011-01-03 12:18:25 +00:00
pooka 6fd00c3f62 Add -c to control the number of CPUs configured in the kernel. 2011-01-03 10:44:40 +00:00
wiz 90bb351524 Sort usage. 2010-12-29 18:49:41 +00:00
wiz 7072bc9c3f Use better reference after sorting in -f description. 2010-12-29 18:48:56 +00:00
wiz 29bd138c93 Sort usage. 2010-12-29 18:48:40 +00:00
wiz 825164c33e Sort some more. 2010-12-29 18:46:48 +00:00
jmcneill 94f6c5770b allow for buffer sizes < 32k 2010-12-29 14:38:54 +00:00
mrg ebcfca8be3 add a new "-B buffersize" flag to both audioplay and audiorecord.
suggested by jmcneill@.

sort audioplay manual some.
2010-12-29 13:09:03 +00:00
christos d6d145ee46 only setup siginfo handler if we have a tty. 2010-12-28 15:28:31 +00:00
christos a6dac2b7b7 The SIGINFO changes made the sigprocmask syscalls dominate all the rest:
- Don't bother dealing with signal masks if we are not connected to a tty.
- Compute the blocking mask only once.
- Only do the block-unblock game only when we are going to do something
  (execute, print a warning, etc.)
2010-12-27 16:09:46 +00:00
wiz 8d68ab3ee4 New sentence, new line. 2010-12-26 14:26:45 +00:00
jmcneill 4b6947bfe1 hook videoctl into build 2010-12-26 11:31:43 +00:00
jmcneill 190912dcf9 add videoctl(1), a tool for displaying or setting parameters on video(4)
devices
2010-12-26 10:37:14 +00:00
christos fdbe2a0785 can't play games with structure names since cpu_data refers to cpu_info, so
provide our own copy for everything.
2010-12-25 23:36:59 +00:00
dholland 626c509661 erm. fix previous... 2010-12-25 21:39:11 +00:00
christos 5ee7c6c8d5 use a local definition of cpu_info if we have __HAVE_CPU_DATA_FIRST 2010-12-25 20:50:36 +00:00
dholland ad5f4cbc2e Maybe fix a problem that appeared on loonix. 2010-12-25 20:46:18 +00:00
dholland f8d6aa2c68 Many C libraries don't set errno when malloc fails, so always use
strerror(ENOMEM).
2010-12-25 20:35:25 +00:00
dholland 305d151446 Improve confusing error message when getcwd() fails. 2010-12-25 20:34:08 +00:00
dholland e05b408d55 Uses stat; needs sys/stat.h. No idea what's pulling it in implicitly on
NetBSD so I didn't notice. Woops. Noted by Kurt Schreiner on current-users.
2010-12-25 17:19:04 +00:00
christos 8ac898131d Don't crash on old kernels that don't have the new per cpu counters. 2010-12-25 14:18:37 +00:00
dholland 3f9d98c828 Begin cleanup of the make parser: separate out the logic for reading files
from the parsing goo. This will now use mmap for reading if it works and
fall back to read only for pipes and such. Step 1 of a cleanup program
proposed without objection on tech-toolchain.
2010-12-25 04:57:07 +00:00
enami d5a41b7133 We still need to update ouvmexp to output the differene from
previous iteration.
2010-12-24 23:39:19 +00:00
njoly 1adf1b7dc0 Fix sub-section reference. 2010-12-23 20:11:00 +00:00
wiz 8011e5f217 Talk more about NetBSD and less about FreeBSD. Sort sections. 2010-12-22 09:05:07 +00:00
christos 90cb07e972 PR/44259: Aleksey Cheusov: xargs: -r option is supported but not documented
Synced with the FreeBSD doc.
2010-12-21 20:30:13 +00:00
christos 301830e51c make this work with the per-cpu counters. 2010-12-20 04:25:03 +00:00
wiz 33d2a9cdc6 Sort sections. 2010-12-18 23:36:23 +00:00
christos 7e6e5c1f48 Add an 'l' style for sorting that sorts by the string length of the field. 2010-12-18 23:09:48 +00:00
christos c732e7b752 PR/44235: Martin Husemann: Fix core dump due to memory corruption.
Found by Henning Petersen
2010-12-18 20:57:41 +00:00
wiz be4e8c8eb1 Replace "\t" with Ta in table.
Fixes output with mandoc. Noted by njoly.
2010-12-18 14:22:42 +00:00
plunky 804a0485e5 correct the error message (wait3->waitpid) 2010-12-17 11:32:57 +00:00
wiz 3d3c5d42cb Observe the following spelling:
- wide character (noun)
- wide-character (adjective)

Inspired by jmc@OpenBSD.
2010-12-16 17:42:25 +00:00
dholland c79b866358 Don't pass unused argument. From Doug Barton. 2010-12-16 05:42:14 +00:00
dholland f0a79c06c5 Use strlcpy, not strncpy, when the desired semantics are strlcpy's
rather than strncpy's.
2010-12-16 05:30:16 +00:00
sjg b3f04f7310 Invalidate meta_fname when we finish a job, so that in compat
mode, we do not report a previous .meta file as being involved
in an error.
2010-12-15 23:03:35 +00:00
pooka bd7256bb7c Guard against supplying the same parameter multiple times in one -d argument. 2010-12-15 19:07:43 +00:00
pooka f258e5074a language fix. sniped by wizd 2010-12-15 18:42:59 +00:00
pooka 8457e85a38 document the current syscall bug with rump_server and -l 2010-12-15 16:23:55 +00:00
pooka 3c577ba703 Deal with crunch the standard way. 2010-12-15 11:22:41 +00:00
wiz 77b9f93f9e Sort options in usage same as in man page.
While here, replace \xa0 with ' '. Where do you get these from?
2010-12-15 09:40:21 +00:00
he c4e8d271ce Make this build with CRUNCHEDPROG defined, and default to the sysctl()
method of fetching information.  Apparently we can't simply not define
the prog_ops struct in this program.
2010-12-15 09:15:05 +00:00
he ad28476e8e Make this build as part of the dist/miniroot build, where it's still
referenced.  Adjust for the move from dist/ to external/.
2010-12-15 08:09:23 +00:00
pooka b6c04e07af Add an example for a server listening on a tcp port.
also, bump date to avoid problems with wizd
2010-12-14 19:52:14 +00:00
pooka dbc10b5a41 Add -d which can be used to register host-backed block devices in
the rump kernel.

It would be cool if this, and the other options, could be specified
in a config file (plist or other).
2010-12-14 16:40:05 +00:00
plunky a8cbf485eb on reflection we can use uintmax_t here instead of trying to decode
the value manually, as only 17 bits are defined and the value is
unlikely to exceed UINTMAX_MAX (would only prevent decoding)
2010-12-14 15:18:20 +00:00
wiz d5dca2a9ff Fix Xr and use Sx. 2010-12-14 09:39:53 +00:00
pooka f2ee316255 Add netstat rump client. For now, it always sets -X, i.e. will
use only sysctl and no kvm (implementing /dev/mem for a rump kernel
would probably not be hard, but still a non-zero effort).

Note: since there is absolutely no network activity in a fresh rump
kernel, rump.netstat usually displays exactly nothing when invoked
without parameters.  Arguments like -r, -bi, -p icmp etc. produce
more stuff.
2010-12-13 21:15:30 +00:00
plunky c7407d6266 add attributes from the Basic Printing Profile v1.2r00 2010-12-13 21:08:37 +00:00
pooka 759b07d20a there's a manpage now ... just not here 2010-12-13 19:39:37 +00:00
pooka 78f20aa8ef manpage 2010-12-13 19:36:34 +00:00
pooka dde3f793dc Also support ld syntax in -l.
was: -l librumpvfs.so
now: -lrumpvfs
2010-12-13 14:26:22 +00:00
pooka d3ab3ede2e Add -m which can be used to load modules (which is a completely
different code path than using dlopen() before rump_init(), since
the former uses the in-kernel linker and the latter links the object
in rtld).

So:
golem> ./rump_server -l librumpvfs.so -m /sys/modules/tmpfs/tmpfs.kmod unix:///tmp/commsuck
==>
golem> env RUMP_SERVER=unix:///tmp/commsuck rump.modstat
NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
suser            secmodel   builtin    0     -        -
tmpfs            vfs        filesys    0     16713    -
wapbl            vfs        builtin    0     -        -

Source is filesys instead of builtin, as expected.

Notably, for -m you *must* use -l librumpvfs.so.  This is because
you need VFS in your kernel to be able to load modules from the
file system.  In a regular kernel "librumpvfs.so" is linked at
kernel build time and loaded by the bootloader.  Here we use dlopen()
for both effects (the other choices would have been to link
rump_server with -lrumpvfs, but that would limit the flexibility,
or link tmpfs.kmod directly into the binary, but that would limit
the flexibility even more).
2010-12-13 14:13:21 +00:00
pooka ac0678fe1e Handle -l which dlopens libs. This is more applicable to rump_server
than rump_allserver.

So if I do:

golem> rump_server unix:///tmp/commsuck
==>
golem> env RUMP_SERVER=unix:///tmp/commsuck rump.modstat
NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
suser            secmodel   builtin    0     -        -

and:

golem> rump_server -l librumpvfs.so unix:///tmp/commsuck
==>
golem> env RUMP_SERVER=unix:///tmp/commsuck rump.modstat
NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
suser            secmodel   builtin    0     -        -
wapbl            vfs        builtin    0     -        -

golem> rump_server -l librumpvfs.so -l librumpfs_ffs.so unix:///tmp/commsuck
==>
golem> env RUMP_SERVER=unix:///tmp/commsuck rump.modstat
NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
ffs              vfs        builtin    0     -        -
suser            secmodel   builtin    0     -        -
wapbl            vfs        builtin    0     -        -

Well, you get the picture...
2010-12-13 13:32:25 +00:00
pooka 53fb74fd7e Add rump_server which is just like rump_allserver with the exception
that it links in only -lrump instead of everything.  The startup
time difference (especially when attaching a debugger) is noticeable.
2010-12-13 13:29:15 +00:00
dholland 75724edb45 typo in comment 2010-12-13 05:01:56 +00:00
dholland a0bf60f562 Tables used by parser logic should be const. 2010-12-13 03:36:39 +00:00
dholland 0b6f5dd2c0 Remove stray extern definition that's already in jobs.h. 2010-12-13 03:35:13 +00:00
dholland 460acf6f5e Cosmetic: declare types before variables, group variables by role,
update some comments, format comments properly, etc. No functional
change intended.
2010-12-13 03:32:25 +00:00
dholland e8acbf7847 Add const necessary for clean non-native build. 2010-12-13 01:48:50 +00:00
pooka 4e63731664 lint hint to previous 2010-12-12 18:33:44 +00:00
pooka ae8a3e28c6 Reboot when killed (does cleanup). 2010-12-12 18:32:47 +00:00
pooka c5a6f78a61 note -h caveat 2010-12-12 17:15:16 +00:00
pooka 6b9a77d4e0 use appropriate macro 2010-12-12 12:49:37 +00:00
pooka 78e5870eec utility to halt a rump kernel 2010-12-12 12:48:30 +00:00
pooka 126e32a17e Detach by default or -s to stay-on-top. 2010-12-11 10:44:55 +00:00
sjg e2f0bc58ba fix style 2010-12-10 00:37:23 +00:00
sjg d196fd3962 Need to export LC_ALL=C too 2010-12-10 00:36:33 +00:00
sjg 2550dc933f meta_oodate(): we should track 'latestdir' on a per process basis.
Also, only consider target out of date if a not-found file is outside
'CWD'.  Ignore anything in "/tmp/" or tmpdir.
2010-12-09 22:30:16 +00:00
enami 84d4bc7040 Fix SYNOPSIS; pkill accepts -l options since 3 years ago. `pattern' is
mandatory for all commands and `priority' is mandatory for prenice.
2010-12-07 09:00:23 +00:00
wiz 73349a6f21 Be explicit which options are available for prenice. Bump date. 2010-12-07 08:55:52 +00:00
mrg f2e8961868 add -l support to prenice, as noted by enami. 2010-12-07 07:39:15 +00:00
mrg 1153d206d6 install prenice(1) and man page links. 2010-12-06 21:16:53 +00:00
pooka 13358eb8c2 Insert word "mbuf" to description of -m (so you can search for it).
No functional change.
2010-12-06 09:28:38 +00:00
wiz c0795be10b Bump date for prenice, add serial comma, and fix an xref. 2010-12-06 08:34:28 +00:00
mrg 79ffd9c9bc add a "prenice <priority> <names>" command.
use it like "prenice -4 mplayer".
2010-12-06 04:00:11 +00:00
pooka ef4d7c2c36 rumpcrypto now comes as part of RUMPKERNLDADD 2010-12-05 20:12:55 +00:00
pooka 843bb51b69 dumdidumdum, fix name in previous 2010-12-05 17:45:08 +00:00
pooka 6eb225bba1 Add a rump server which comes with all the drivers currently
available.  In terms of modules it maps to:

golem> rump.modstat
NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
bpf              driver     builtin    0     -        -
cd9660           vfs        builtin    0     -        -
cgd              driver     builtin    0     -        -
dm               driver     builtin    0     -        -
efs              vfs        builtin    0     -        -
ext2fs           vfs        builtin    0     -        ffs
fdesc            vfs        builtin    0     -        -
ffs              vfs        builtin    3     -        -
fss              driver     builtin    0     -        -
hfs              vfs        builtin    0     -        -
kernfs           vfs        builtin    0     -        -
ksem             misc       builtin    0     -        -
layerfs          misc       builtin    2     -        -
lfs              vfs        builtin    0     -        ffs
mfs              vfs        builtin    0     -        ffs
msdos            vfs        builtin    0     -        -
nfs              vfs        builtin    1     -        -
nfsserver        misc       builtin    0     -        nfs
nilfs            vfs        builtin    0     -        -
ntfs             vfs        builtin    0     -        -
null             vfs        builtin    0     -        layerfs
pad              driver     builtin    0     -        -
ptyfs            vfs        builtin    0     -        -
puffs            vfs        builtin    0     -        putter
putter           driver     builtin    1     -        -
scsiverbose      misc       builtin    0     -        -
smbfs            vfs        builtin    0     -        -
suser            secmodel   builtin    0     -        -
swsensor         driver     builtin    0     -        -
sysvbfs          vfs        builtin    0     -        -
tmpfs            vfs        builtin    0     -        -
udf              vfs        builtin    0     -        -
umap             vfs        builtin    0     -        layerfs
union            vfs        builtin    0     -        -
usbverbose       misc       builtin    0     -        -
wapbl            vfs        builtin    0     -        -


In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp


and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
        pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture


There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 17:37:32 +00:00
christos 24e17e276b From Aleksey Cheusov: Fix unexpected behavior with:
all: test1 test2
test1:
	@echo ${foo::=foo-text}
test2:
	@echo $(foo::=foo-text)
Saying:
nbmake: Unclosed substitution for foo (} missing)
for test 2
2010-12-02 16:46:22 +00:00
christos 8d8e09f9aa add commented out a possible addition that provides $^ like gmake, but
I am not sure if we should add it, since we already have $> for it.
2010-12-02 16:36:55 +00:00
dholland 3e1a0ddeec Ahem. "Battle" of Wounded Knee? How about "massacre"?
XXX: this file needs a *lot* of attention.
2010-12-02 08:36:02 +00:00
mrg 347cb101f4 properly detect that we aren't od(1) and act as hexdump. fixes hexdump,
which also broke startx (second time this week!)

from mlelstv.
2010-11-28 10:45:32 +00:00
wiz 40472df47e Make SYNOPSIS match usage. 2010-11-28 01:33:37 +00:00
christos e45d815960 revert and fix the usage to be consistent with other programs. 2010-11-27 20:46:38 +00:00
christos 890fb8eb91 add -H and -e 2010-11-27 19:46:25 +00:00
christos f18b98792f fix typo (thanks simon) 2010-11-27 16:00:09 +00:00
sjg 1b59e5d011 When a source file moves, make will ignore the stale dependency,
but if the file in question is one that needs to be compiled (.c or .cc),
it still hands the bogus name to the compiler.

If Dir_MTime() cannot find such a file (gn->iParents is not empty),
see if the basename can be found via .PATH, and if so set gn->path to
the found file.   This prevents the stale path being given to the
compiler.

In meta_oodate(), if a referenced file no longer exists, consider the
target out-of-date.

Also, if meta_oodate() decides a target is out-of-date, and it
it uses .OODATE in its commands, we need .OODATE recomputed.
Undo our call to Make_DoAllVar() so that the call from Make_OODate()
will do the right thing.
2010-11-27 05:02:35 +00:00
dholland bb9db00d5a PR 44156: od -? prints usage for "hexdump" rather than "od" 2010-11-27 00:42:58 +00:00
christos f8063a37d7 check for NULL before de-referencing. 2010-11-26 15:14:29 +00:00
christos d670c5cfeb Instead of keeping around the mtime of the youngest child, keep a pointer
to it, so that we can print it when we do the out of date determination.
2010-11-25 21:31:08 +00:00
dholland 436ec2bec5 Improve previous with comments. 2010-11-25 04:33:30 +00:00
dholland 09bec75330 Don't printf time_t with %d; fixes PR 44128 from yamt. With this change it
successfully prints mtimes after 2038.
2010-11-24 22:57:53 +00:00
christos f6fb458da3 PR/44148: Henning Petersen: catstrg() does not set the resulting string length. 2010-11-24 17:51:11 +00:00
christos b88895de6f PR/44147: Henning Petersen: Add missing closedir calls. 2010-11-24 17:40:41 +00:00
christos 4ef443d8ef - pass lint
- minor spacing nits
- check allocations
2010-11-24 13:17:56 +00:00
yamt 22304c0e72 C version of tpfmt.sh 2010-11-23 20:48:40 +00:00
wiz 78f9e33271 Fix Dd argument. 2010-11-16 23:59:02 +00:00
christos 06b55256bc minor KNF nits. 2010-11-16 02:53:49 +00:00
christos d6f06df46c add a safe alternative of the previous. 2010-11-10 01:44:04 +00:00
apb 4c73f7f041 Change the ironically unafe "find . -print | xargs pathchk -p" to
the safe "find . -exec pathchk -p \{\} +" in an example.
2010-11-09 20:34:55 +00:00
mrg 77a6c12f15 pull across a few changes from the freebsd folks:
http://svn.freebsd.org/changeset/base/213044
	- fixes gunzip issues
http://svn.freebsd.org/changeset/base/213927
	- fixes various typos and comments

and also an older change to add support for bzip2's "-k" option:
	don't delete the input file


thanks!
2010-11-06 21:42:32 +00:00
wiz 5140adc8f3 Sort sections. 2010-11-03 12:21:50 +00:00
plunky a4d969557b In server mode, relax the requirement to specify a channel number. If
one is not given, attempt to allocate the first unused one.
2010-11-03 08:27:27 +00:00
plunky ff185da4c9 -s can be used in server mode too 2010-11-02 19:44:09 +00:00
njoly e65e925989 Fix typo in date. 2010-11-02 12:10:13 +00:00
christos 710d230a43 simplify and modernize:
- make sysctl mibs static
- use warn/warnx for warnings
makes binary 4K smaller.
2010-10-18 19:39:32 +00:00
njoly 53f8ab79a9 Do use putenv(3) to handle the provided strings directly, instead of
setenv(3) which need string splitting and later reassembly.
2010-10-16 11:13:52 +00:00
skrll e6cdac9c4b Implement dl_iterate_phdr.
Somewhat taken from FreeBSD. Manual page from OpenBSD.
2010-10-16 10:27:06 +00:00
jschauma 40df9f7982 remove duplicate 'was' in a comment 2010-10-15 19:35:08 +00:00
dholland 1657dadafa Per PR 19359 note that mkdep doesn't handle all make metacharacters
correctly; in particular, filenames containing '#' cause trouble,
although '$' seems to be ok. Bump date.
2010-10-15 05:46:48 +00:00
wiz 146c9ced7d Sync usage with man page. 2010-10-06 07:59:18 +00:00
dholland d4471f4981 Allow -c with -d/-u. While uniq -cu isn't that useful, uniq -cd often is.
No objection on tech-userlevel, and the arbitrary restriction has been
irritating me for ages.
2010-10-06 06:43:26 +00:00
wiz 2724492d78 Print version string to stdout instead of stderr;
it is user-requested and not an error.
2010-10-02 19:31:14 +00:00
tron c71ba331c0 Don't free memory that was succesfully passed to putenv(3) which takes
ownership of the memory.
2010-10-02 10:55:36 +00:00
gson 98bb28c039 putenv() no longer accepts a const string 2010-10-02 09:24:16 +00:00
wiz 218cd6edd9 Remove trailing spaces, add a few serial commas. 2010-09-14 11:57:03 +00:00
sjg e7543dc43a tools/make/buildmake.sh compiles *.c, make sure meta.c does nothing
unless USE_META is defined.
2010-09-13 21:31:59 +00:00
sjg 796c4b0282 We do not need filemon(9) to have a .meta file 2010-09-13 20:34:21 +00:00
sjg c0dfab6508 Bump date 2010-09-13 16:32:00 +00:00
sjg 4db43f7e0c Add meta.c which implements "meta" mode for make.
In this mode, a .meta file is created for each target, capturing
the expanded commands used, any command output, and if filemon(9)
is available, a record of system calls which are of interest.
Not enabled unless USE_META=yes is set when building make.
Also, if FILEMON_H exists, meta.c will be compiled to use filemon(9).
2010-09-13 15:36:57 +00:00
wiz fcf318eda4 Fix typos found by Ryo HAYASAKA in PR 43857.
While here, split file systems that grew together.
2010-09-09 11:42:13 +00:00
christos 963d31a298 KNF, make error messages consistent. 2010-09-08 13:58:46 +00:00
christos d049daf420 PR/43852: Wolfgang Stukenbrock: yp_passwd command may destroy NIS database
entries when used on a server that includes users via netgroups.
2010-09-08 13:44:44 +00:00
jmcneill d148107cd6 return an error if testing fails, and dump the device info before running tests 2010-09-03 19:20:37 +00:00
jmcneill e90b0e0082 at the request of mrg, print the parent of audioN's device name 2010-09-02 02:17:35 +00:00
jmcneill 59619cc632 print the version field from AUDIO_GETDEV if present 2010-09-02 02:08:30 +00:00
jmcneill 014a1e1b18 use htole16 to ensure that the pcm stream is slinear16_le on big endian hosts 2010-09-01 21:54:00 +00:00
wiz 7a2801201d Index argument is not optional, make it clearer in the usage. 2010-09-01 09:18:03 +00:00
wiz 600e381dfa Update for Jared's changes from a few minutes ago. 2010-09-01 09:17:31 +00:00
jmcneill e405ac8d24 add support for testing audio devices. the usage of audiocfg changes:
audiocfg list
  audiocfg default [index]
  audiocfg test [index]

'list' shows the available audio devices, 'default' sets the default
audio device, and 'test' will play a tone for 2 seconds on each
channel. example:

  $ ./audiocfg list
  0: [*] audio0: ICH2 AC97 (2 playback channels)
  1: [ ] audio1: Pseudo Audio (2 playback channels)
  $ ./audiocfg test 0
  testing channel 0...
  testing channel 1...
  $
2010-09-01 09:04:16 +00:00
wiz bd524aa578 Mention that audiocfg also controls /dev/audioctl, /dev/mixer, and /dev/sound.
Noted by mrg.
Bump date.
2010-09-01 07:50:33 +00:00
wiz 0b930dd75d Add man page. 2010-08-31 14:57:26 +00:00
mrg 172ca3ccec add a simple app to maintain the symlinks for audio devices in /dev, so
that it's easy to change the "default" audio device.  eg:

# audiocfg
0: [*] audio0: HD Audio
1: [ ] audio1: HD Audio
2: [ ] audio2: Pseudo Audio
# audiocfg 1
setting default audio device to audio1
# audiocfg
0: [ ] audio0: HD Audio
1: [*] audio1: HD Audio
2: [ ] audio2: Pseudo Audio

written by jared.  thanks!

(there's a separate patch in the works to give "HD Audio" a better name.)


this is not enabled yet, but will be soon.

it also needs a manual page.  any takers?
2010-08-30 02:19:47 +00:00
christos d28b9cb610 unhook awk again 2010-08-27 16:50:10 +00:00
christos 75bfb16aca switch back to the old awk till I fixed the problem. 2010-08-27 16:38:27 +00:00
christos 74e4b96653 Unglue awk. 2010-08-26 14:57:47 +00:00
chs 692e1d3085 fix emul state tracking for exit vs exit_group on linux. 2010-08-08 18:31:50 +00:00
sjg 5bc2a55818 In jobs mode, if we cannot make a target we die without any further
clue.  Call PrintOnError() before DieHorribly().
2010-08-07 21:28:40 +00:00
sjg 55b9a99afa wait[pid]() is called in several places.
If we encounter an error and run the .ERROR target, we may
reap a pid which jobs is waiting for.  Ensure that we
cleanup so that make isn't left waiting for an already
deceased child.
2010-08-07 06:44:08 +00:00
cube 3f1dd008b1 Emit compatible struct devsw_conv when version is older than 20100430. 2010-07-30 16:23:49 +00:00
christos 703b8bafda PR/43643: David A. Holland: dash prefix broken with make -j
As the comment says in JobPrintJob set JOB_IGNERR with - commands. Fix
whitespace so that the output is consistent, although there are two separate
execution logic implementations (command.c, job.c)
2010-07-20 16:39:27 +00:00
tron 40771355a2 Fix argument handling of the "-b" option on 64bit platforms. Using
"-b 1024k" would previously fail with this error message:

progress: buffer size 1048576 is greater than -1.
2010-07-17 10:51:03 +00:00
mrg 52a4f7ac75 remove the remaining non-ELF code. 2010-07-11 12:07:31 +00:00
kiyohara ee29569a43 Change '-e' to optional. Use load addr(-a), if '-e' not specify.
Just like u-boot's mkimage.
2010-07-10 07:48:25 +00:00
kiyohara 3b82565500 s/mkuboot/mkubootimage/ in usage(). 2010-07-09 11:36:42 +00:00
enami 4964ac468f Line up total numbers again. 2010-07-09 07:04:30 +00:00
rmind d2bd4814d4 Add #include <sys/param.h> 2010-07-08 20:52:22 +00:00
christos e2d47bd7fa get the value of the entry for the class not the key. 2010-07-07 21:24:34 +00:00
pooka 062d6d1f8d Make "i" unsigned to mirror change to struct uvm_history 2010-07-07 11:42:18 +00:00
mrg 4c92852a80 remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format.  ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k.  this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
  down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
dholland 6b10e71eb2 Revert 1.80, which somehow manages to produce different (wrong)
behavior with -jN. Unfixes PR 43534. Need a different approach...
2010-07-06 03:56:59 +00:00
wiz fbb846b2d3 Bump date for previous (mpls). 2010-06-30 07:30:16 +00:00
dholland a472ed2f77 Document that suffix rules are not applied to PHONY targets, and also
document the .TARGETS builtin variable, which has existed since 4.4 days.
Bump date. Arises from discussion in PR 43502.
2010-06-30 01:03:54 +00:00
dholland d6bfe606f5 Set .PREFIX early the same place .TARGET is set. This makes sure it's
defined even in cases where the suffix search logic is skipped, such
as .PHONY targets, and fixes PR 43534.

Note: because .PHONY targets do not get suffix searching, .PREFIX will
not have any suffixes removed. This seems vaguely logical, although
it's not the only reasonable interpretation.

We may also want to reconsider whether suffix rules are skipped for
phony targets, too. That behavior is somewhat counterintuitive.
2010-06-30 00:25:04 +00:00
kefren 0e9c730672 Add mpls into family address list 2010-06-29 12:38:12 +00:00
kefren a58bbf2771 Add -T flag, that shows tags in route output 2010-06-27 06:52:37 +00:00
dholland 563d98c883 fix previous, the source isn't exactly crystal clear and there's a bug that
makes the behavior misleading.
2010-06-27 00:53:32 +00:00
dholland 35590dfabc Clarify $(.PREFIX) / $*. Bump date. 2010-06-27 00:06:32 +00:00
kefren 92b0c8320e add MPLS clue for showing routes 2010-06-26 14:30:31 +00:00
yamt 355e79354d don't bother to connect to amd unless necessary. PR/42207 2010-06-23 18:07:59 +00:00
dogcow 4ed2cab9df nbtool.h'ify; fixes cross-compilation. 2010-06-22 14:54:11 +00:00
christos 02bc858973 - fix format print issue. from anon ymous 2010-06-21 19:49:31 +00:00
mrg 1909f84b1c - always install pigz. hooary!
- kill MKPIGZ.
- add MKPIGZGZIP.  if it is "no", then only install pigz as pigz.  if it is
  not "no", don't install mrgzip, install pigz as gzip.

in all cases, the z* scripts.


i don't like the name MKPIGZGZIP so if anyone has a better name, feel free
to replace it.  i don't care enough since killing the ugly name is just
more incentive to get pigz doing .bz2, .Z and .z.
2010-06-19 03:50:30 +00:00
jmcneill 192740f5f9 hook mkubootimage into the build 2010-06-18 18:57:27 +00:00
jmcneill f18dcb652c add mkubootimage(1), a tool for creating u-boot compatible images 2010-06-18 18:55:48 +00:00
mrg 7b21e162d6 if MKPIGZ != no, build gzip, otherwise build pigz. 2010-06-17 06:29:16 +00:00
sjg aa86bc2068 JobFinish: call PrintOnError if we detected an error we are not ignoring.
This gives the .ERROR target a chance to run at the first sign of trouble.
2010-06-17 03:36:05 +00:00
tnozaki 2a7af30c36 1. split runetype_local.h -> runetype_file.h
and remove renameing _Rune* -> _NBRune* namespace protection.

   FreeBSD traditionaly exposes struct _Rune* in runetype.h
   which included by ctype.h. it may cause conflicting type error
   in our cross build process, former we use renaming namespace
   to avoid this problem, now i reworked more resonable way.

2. merge rune_local.h to runetype_local.h, and remove it.
3. split bsdctype.h -> bsdctype_{file,local}.h
2010-06-13 04:14:56 +00:00
tnozaki 2a589509a4 use _FileRune* instead of _Rune*. 2010-06-12 02:51:34 +00:00
wiz e2a56e055d Whitespace. 2010-06-10 18:35:22 +00:00
christos 801f2ebf67 Explain variable expansion better. Requested by Aleksey Cheusov 2010-06-09 16:58:22 +00:00
riz 3f1d9ecd93 Fix spelling of "whether", from Ryo HAYASAKA in PR 43432. 2010-06-08 03:08:47 +00:00
wiz 76aa4cd57b Bump date for previous. 2010-06-06 17:28:48 +00:00
sjg fbb620d711 Add .export-env which tells make to export a variable to the environment
but not to track it - as is done for .export
This allows the variable to be updated without affecting what was put
into the environment.
Older versions of make will simply treat this as .export
2010-06-06 01:13:12 +00:00
wiz 90abead58e Fix typo in comment. 2010-06-06 00:00:33 +00:00
jnemeth c8bd5cbe3b The US formally left the Gold Standard in 1971, not 1933. See:
http://en.wikipedia.org/wiki/Nixon_Shock
2010-06-05 20:53:44 +00:00
dholland fcf4d3f750 Rework previous change to fixit() to not trip on option arguments. (Noticed
by wiz.) Clarify the loop logic involved.
2010-06-05 17:46:08 +00:00
dholland 8696c1b71e fixit() needs to know the getopt options list to do its thing correctly. 2010-06-05 17:44:51 +00:00
lukem f8daa4a728 In ftpvis(), prevent incomplete escape sequences at end of dst,
and ensure NUL-termination of dst.  Also tweak for readibility.
Fix from Uwe Stuehler and Stefan Sperling, via Marc Balmer.
2010-06-05 13:59:39 +00:00
dholland 2480682bb2 Avoid SIGSEGV on out-of-range time_t. 2010-06-05 03:24:01 +00:00
sjg 945e78bffe We have required sigaction() for quite a while.
Use bmake_signal() - a wrapper around sigaction()
rather than signal() to ensure that signals are handled
consistently.
2010-06-03 15:40:15 +00:00
dholland 1811323fc9 no braaaains for you! 2010-05-30 00:45:03 +00:00
dholland 0235e12103 more undead files 2010-05-30 00:39:49 +00:00
dholland d6986f611b Rerun valid_format() both before and after unescaping the format
string, in case the format string contains printf conversions
assembled from escape sequences.

A better approach might be to adjust the unescape logic to avoid
generating printf conversions (e.g. convert \x25 to %% instead of %)
but that's somewhat problematic and it's not really worth taking the
trouble.

Running valid_format() only after unescaping would also be somewhat
tidier but makes printing the invalid format string problematic,
because the unescape logic runs in place.

None of these cases are really worth worrying about in detail, but now
at least they don't result in SIGSEGV.

Related to PR 43355.
2010-05-27 08:40:19 +00:00
dholland 76c7c8ecbf Fix valid_format() to be more careful about allowing only valid printf
formats.

Also, accept %a and %A, which are new since this logic was last updated,
and also allow %F even though it's not functionally different from %f.
Document these additions and bump date of man page.

Fixes PR 43355.
2010-05-27 08:30:35 +00:00
dholland b6360c7f71 Don't recognize "+3" after -- or after the first non-option argument.
This prevents converting "+3" into "-k4.1" in places where getopt
won't recognize it, which in turn prevents silly error messages and
lossage trying to sort files whose names begin with +. PR 43358.
2010-05-27 05:52:29 +00:00
christos 478b26f3ff fix empty suffix case. 2010-05-26 18:07:34 +00:00
christos 07072da337 PR/43364: Nicolas Joly: mkdep(1) wrong target names when suffix list miss .o 2010-05-26 15:04:40 +00:00
sjg 3e3df25ba3 Don't missinterpret targets that start with .info 2010-05-24 21:04:49 +00:00
christos cbc22ad229 - centralize the snprintf code.
- use err where appropriate.
- add machclass which should be x86 when i386 and amd64 and can be specified
  in man.conf as:
	_i386	x86
	_amd64	x86
  so that we can support merged pages. Nothing uses this yet.
2010-05-23 22:04:36 +00:00
tnozaki 04cc7786fc rework bulid breakage problem on linux.
ldef.h: s/1<<8/_CTYPE_CACHE_SIZE/
ctype_local.h: use limits.h instead of machine/limits.h
runetype_local.h: don't use HAVE_NBTOOL_CONFIG as evil way.
2010-05-22 18:15:21 +00:00
tnozaki 81573c1976 yacc.y: s/_CTYPE_NUM_CHARS/_CTYPE_CACHED_SIZE/
ldef.h: remove redundant include, ctype_local.h is already included by
        runetype_local.h.
2010-05-22 17:43:29 +00:00
tnozaki a6a1331586 include ctype_local.h 2010-05-22 07:18:44 +00:00
tnozaki 64a7d4fa9a 1. hide _CTYPE_PRIVATE section in ctype.h, move them to private header ctype_local.h.
2. do not use _CTYPE_NUM_CHARS macro to read data from LC_CTYPE(old BSDCTYPE style) database.
   because 1<<CHAR_BIT is MD, so i added MI macro _CTYPE_CACHE_SIZE(1<<8).
3. remove _NB_CACHED_RUNE macro, use _CTYPE_CACHE_SIZE instead.
2010-05-22 06:38:15 +00:00
christos b724c2d39e put back canonicalization, but avoid doing it for files that don't contain /
From dholland
2010-05-17 17:01:16 +00:00
dholland b500f55a59 and, erm, bump date too. 2010-05-16 07:40:53 +00:00
dholland 50d151d5f4 Grammar, clarification, and note that the rusage information is total
as opposed to strict subprocess only.
2010-05-16 07:40:13 +00:00
joerg 757c7f4987 Reorder sections to canonical order. 2010-05-15 00:08:31 +00:00
joerg 3995b4b94e Explicitly close quote. 2010-05-14 17:31:26 +00:00
joerg 0fcea3311f Resort sections to canonical order. 2010-05-14 17:28:23 +00:00
joerg 88e16b2390 Simplify markup. 2010-05-14 17:24:38 +00:00
joerg ff7d7a232d Escape punctuation. Use logical markup for indentation. 2010-05-14 17:23:13 +00:00
joerg a4a2a21512 Resort sections to canonical order 2010-05-14 17:20:06 +00:00
joerg 25206905a3 Improve/fix/deuglify markup. 2010-05-14 17:14:28 +00:00
joerg 762152502e Reorder sections to canonical order. 2010-05-14 17:06:40 +00:00
joerg 3d90cef610 Reorder sections to canonical order. Use .Ex -std. 2010-05-14 17:03:19 +00:00
joerg 75251fe0d1 Reorder sections to canonical order. 2010-05-14 17:02:01 +00:00
jruoho 3ae25c77b6 RETURN VALUES -> EXIT STATUS. 2010-05-14 16:58:32 +00:00
joerg 15a1cc61c0 Fix section order. Use .Ex -std 2010-05-14 16:54:48 +00:00
joerg 1334e3ed24 Reorder to canonical order. 2010-05-14 16:48:36 +00:00