Commit Graph

13285 Commits

Author SHA1 Message Date
sjg 929a26a3de Use Lst_FindFrom and Lst_Succ(ln) to find next entry in missingFiles. 2016-08-10 18:49:40 +00:00
sjg c2d73114d1 Linux filemon only records D some/dir for rm -rf
rather than D entries for each file removed.
Thus we need a loop to remove all matching missingFiles entries
2016-08-10 18:25:00 +00:00
christos 6a9ab0dd0e Bump version for -no 2016-08-07 21:11:55 +00:00
christos f138f6c50d Accept "-no" as a "no" that does not cause errors if the object deleted
does not exist.
2016-08-07 10:37:24 +00:00
christos b31382fbd7 Avoid string gymnastics in an olympic year. 2016-08-05 07:22:17 +00:00
jakllsch ccf7078d06 Make this build with clang:
- Remove unused static const variables
 - Adjust impossibleish comparision.
2016-08-04 12:56:31 +00:00
wiz 4ff383b44d Bump date for new ifstat command. 2016-08-03 13:09:43 +00:00
maya 519ca6e803 Do globbing for FTP URLs of the form ftp://... too
ok christos
2016-08-03 12:33:56 +00:00
scole 6f3aa0fcd4 Add $NetBSD$ tag for new files 2016-08-02 17:53:46 +00:00
scole bd7662dc4d PR bin/51204
Add ifstat command to systat.

Imported from FreeBSD
2016-08-02 15:56:09 +00:00
dholland cf12c76a8b Don't allow initializers of the form { .a = .b = expr } as this is not
valid. Helps a bit with PR 22500.
2016-07-31 22:38:04 +00:00
dholland 096da17405 typo in comment 2016-07-31 22:36:53 +00:00
christos c351e21641 accept attributes in param decls 2016-07-20 18:14:12 +00:00
christos 29a071ed18 handle "extern __attribute__((__gnu_inline__)) __inline" 2016-07-20 17:42:14 +00:00
maya bd2a0d0ca6 Don't reference older CFATTACH_DECL 2016-07-19 17:01:04 +00:00
pgoyette e8f1cd85e9 Only emit bdevsw externs for entries in the bdev table, rather than for
entries in the cdev table.
2016-07-16 07:13:26 +00:00
christos b305547c0c more XXX removal. 2016-07-14 20:38:20 +00:00
christos 1584c6d3ed XXX: removal 2016-07-14 20:34:36 +00:00
christos fb3d963d14 remove soft interrupt queues that don't exist anymore. 2016-07-14 20:13:10 +00:00
christos bb9aed0669 remove __P 2016-07-14 19:39:41 +00:00
christos cfa835e475 dedup 2016-07-14 18:58:26 +00:00
christos 21c3ca2d5c use sysctl to print multicast addresses 2016-07-14 18:19:11 +00:00
christos 143eb5c5cf fix sysctl based interface printing, and annotate where we should add the
missing multicast printing code.
2016-07-13 22:01:12 +00:00
christos 543b506e7c Use sysctl for interface printing (-i), leave on for multicast address printing
(-ia) and comment in the code where this is missing?
XXX: should that be an ioctl or sysctl? provide getifmultiaddrs() via the
routing socket? I guess since this is just for netstat a simple sysctl or
ioctl would suffice. I lean towards sysctl.
2016-07-13 21:57:01 +00:00
shm 3d9e7389b4 Add USE_FORT support. 2016-07-13 13:10:04 +00:00
dholland bb1c83042f PR 51298 David Binderman: simplify redundant conditionals 2016-06-30 15:34:30 +00:00
dholland dc73bb47b8 PR 51192 David Binderman: fix wrong logic (probably)
XXX: this file should probably just be deleted
2016-06-30 05:56:46 +00:00
dholland b7f11ede62 Fix DEBUG_SRC build. Partly from PR 51191. 2016-06-30 05:34:04 +00:00
dholland 0088fcac6f Cleanse an old mangy way of avoiding an unused variable warning.
PR 51191 from David Binderman.
2016-06-30 05:31:00 +00:00
dholland f3d720012b Fix botched logic; PR 51191 from David Binderman. 2016-06-30 05:28:23 +00:00
sjg 846bd14287 meta_compat_parent: fflush each line 2016-06-29 22:10:08 +00:00
wiz 902b00da39 Sync usage with program. Add RCS Id. Increase column width. Fix macro usage. Improve wording. 2016-06-28 09:25:21 +00:00
wiz 5afefdc4ed Sort options in usage. 2016-06-28 09:24:46 +00:00
wiz 1e7f61c60e Infile is also optional. 2016-06-28 09:23:09 +00:00
wiz 8aeff4f5ae Sync usage between program and man page. Increase column width. 2016-06-28 09:22:16 +00:00
wiz 8e4e7d0ff8 Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd. 2016-06-28 09:20:30 +00:00
maya dcb772676a Mention -d flag in mkesdb(1) usage
PR bin/24001
2016-06-27 20:15:16 +00:00
maya aeb2930556 Add man page for mkesdb
Imported from FreeBSD
2016-06-27 20:09:18 +00:00
maya dca09610a7 Add man page for mkcsmapper.
Imported from FreeBSD.

PR bin/24001
2016-06-27 20:07:26 +00:00
abhinav dcf78ec2af Add a FILES section and add references to terminfo(3), terminfo(5) in SEE ALSO.
Ok by wiz
2016-06-24 12:03:22 +00:00
abhinav 8dc887f792 Make all the global variables and functions static.
While there, remove unused variables and function prototypes.
Ok from christos
2016-06-23 03:58:13 +00:00
abhinav f2d77fdf32 Replace makewhatis(8) with makemandb(8) in SEE ALSO. 2016-06-16 15:11:43 +00:00
abhinav edcef964c4 Document -f option for man(1).
Also remove unsupported options for `man -k` from the synopsis and usage.
2016-06-16 15:10:58 +00:00
sjg fee87d5733 meta_oodate: set needOODATE if oodate due to missing .meta file. 2016-06-14 18:16:06 +00:00
abhinav 762c2184ca Make the function static in the definition (prototype was already declared static).
Missed in my last commit.
2016-06-13 14:58:57 +00:00
wiz 46dfe48d23 Remove trailing whitespace. Remove unnecessary quotes. 2016-06-13 06:17:19 +00:00
pgoyette fb5782856e Fix missing quote. Resolve automated test failure. 2016-06-13 02:06:44 +00:00
pgoyette cc610a3c94 Add new primaries -asince, -csince, and -since to compare file's
attributes against a user-specified timestamp (rather than the
attributes of a reference file).

Update the parse routines so they have access to the name of the
option being parsed.  This enables accurate error reporting for
"aliases" of primaries.

Now that aliases work, introduce some aliases for consistency with
Gnu findutils.
2016-06-13 00:04:40 +00:00
pgoyette d3e6512866 Use .Ic markup for consistency with the rest of the document 2016-06-12 22:25:13 +00:00
pgoyette 09ebf81448 Further clarification of the treatment of numeric user and group names. 2016-06-12 22:17:18 +00:00
dholland 9d2811fca4 Extend the numeric handling for uids with -user to gids with -group, and
document it. Leftover bit of PR 46158.
2016-06-12 20:50:10 +00:00
abhinav 736d303b6e Add libutil to the DPADD variable. 2016-06-12 14:28:26 +00:00
abhinav 89e188185f Fix a buffer overflow when reading from files containing extra long lines.
Instead of using a statically allocated buffer, manage the buffer at run-time
and reallocate as needed.

It was dumping core for following two cases:
man evrpc | ul
man xdm | ul

While there, also remove __P macro from function prototypes.

Ok from Christos.
2016-06-12 13:29:29 +00:00
pgoyette 355a32cb7e Change -{min,max}depth argument name from n to depth so that the
earlier statement concerning n being prefaced by a plus or minus.
(These exceptions to the +/- rule noted by kre@)

While here, fix markup error.  .Em for emphasis (stress) rather
than .Ar  :)
2016-06-12 03:21:35 +00:00
christos 88297dee99 fix memory leak, simplify 2016-06-07 03:04:45 +00:00
sjg e917da0d70 Extend the mtimes cache used by dir.c so it can be used by others.
We store both st_mtime and st_mode, since some callers care about the
later.

Reviewed by: christos
2016-06-07 00:40:00 +00:00
abhinav 241fae59df Convert reference to f77(1) from .Xr to .Ic as we don't have it any more.
Ok from wiz@
2016-06-06 16:32:19 +00:00
abhinav 00ae54ede2 Remove reference to uucp(1) in SEE ALSO, as it is no more there.
Ok from wiz@
2016-06-06 15:09:33 +00:00
abhinav 3c254bc4ef We don't have f77(1) anymore, remove the reference from SEE ALSO.
While there, also add .An for AUTHORS section.
Ok from wiz@.
2016-06-06 14:25:12 +00:00
dholland f6685469c0 Fix CSRG-era typo: typedef, not typdef. Spotted by Piotr Stefaniak. 2016-06-05 18:35:32 +00:00
christos fcb395931a NUL terminate. 2016-06-05 01:39:17 +00:00
sjg 35fa3446c5 Avoid breaking !NetBSD build 2016-06-05 00:48:58 +00:00
sjg ec729b232b meta_oodate even when missing-meta is true, we do not make a target in
.CURDIR out of date just because of a missing meta file.

Also we can only be missing filemon data if we had a meta file.
2016-06-04 22:17:14 +00:00
agc 3f81b60716 Following positive feedback on tech-userlevel, move the sys_info
script from othersrc to usr.bin/sys_info

	The sys_info script is a small script which will show the version
	information for installed utilities.  It also works on the kernel, and
	on most libraries.

	Its use is as follow:

		[19:41:13] agc@netbsd-002 ...external/bsd/sys_info [4568] > ./sys_info -a
		awk-20121220
		bind-9.10.3pl3
		bzip2-1.0.6
		calendar-20160601
		ftpd-20110904
		g++-4.8.5
		gcc-4.8.5
		grep-2.5.1anb1
		gzip-20150113
		bozohttpd-20151231
		NetBSD-7.99.26
		netpgp-3.99.17
		netpgpverify-20160214
		ntp-4.2.8pl5
		openssl-1.0.1r
		sqlite3-3.12.2
		openssh-7.1
		opensshd-7.1
		tcsh-6.19.00
		xz-5.2.1
		[19:41:20] agc@netbsd-002 ...external/bsd/sys_info [4569] > ./sys_info ntp ssh netpgp
		ntp-4.2.8pl5
		openssh-7.1
		netpgp-3.99.17
		[19:41:31] agc@netbsd-002 ...external/bsd/sys_info [4570] > ./sys_info ntp ssh netbsd
		ntp-4.2.8pl5
		openssh-7.1
		NetBSD-7.99.26
		[19:41:38] agc@netbsd-002 ...external/bsd/sys_info [4571] >

	The -a option can be given to the script to print out the information
	on all known components.

	The sys_info script also works on libraries, returning their
	"versions" as given by the shared object version numbers.

		[19:45:06] agc@netbsd-002 ...external/bsd/sys_info [4572] > ./sys_info libevent libXfont libc netbsd
		libevent-4.0
		libXfont-3.0
		libc-12.200
		NetBSD-7.99.26
		[19:45:27] agc@netbsd-002 ...external/bsd/sys_info [4573] >

	Alistair Crooks
	Wed Jun  1 19:44:01 PDT 2016
2016-06-04 15:27:11 +00:00
wiz 401a245f9e Fix typo in width argument; end sentence with dot. 2016-06-03 07:07:37 +00:00
agc 1f657fa580 Commit patch sent to tech-userlevel with universal approval to add a
version option for calendar(1):

	% calendar -v
	calendar-20160601
	%

For reference, see:

	http://mail-index.netbsd.org/tech-userlevel/2016/06/02/msg010081.html
2016-06-03 02:06:40 +00:00
sjg cb28c6994f Add cached_realpath()
realpath(3) is expensive, and meta mode at least uses it extensively.
We use cached_realpath() to save the result of successful calls to
realpath(3) in a private variable context.

This improves the worst case performance (eg examining libc with
nothing to do) by a factor of 4.

Reviewed by: christos
2016-06-03 01:21:59 +00:00
sjg 2d086608a8 Refactor the logic for deciding when a .meta file is needed.
Both meta_create() and meta_oodate() now share meta_needed()
to indicate if a .meta file is needed.

This allows for deciding that missing .meta file is cause of out-of-date.
The new knob 'missing-meta' controlls this, and is off by default
since the side effect files of generators like yacc will typically need
.NOMETA to avoid problems.

This however makes it much easier for folk to switch back and forth
with meta mode (eg. FreeBSD's normal build can leverage meta mode for
improved reliablility without need to clean).

Also if .MAKE.MODE does not contain 'nofilemon', the knob
'missing-filemon' allows control as to whether missing filemon data
should cause the target to be out-of-date.
Again off by default.
2016-06-03 01:16:27 +00:00
wiz 738f858418 Sort options and their descriptions. Sync usage more with man page.
Bump date in man page for new option -C.
2016-06-01 08:24:03 +00:00
kre a868903568 Add the posix -C option (-c but quieter). Fix -R to work properly when
setting \n as the record delimited using a numeric value rather than literal
\n - and to not incorrectly turn \n into a field separator if -R is used to
make some other char the record separator (\n becomes a field separator in
that case as long as the field separator remains "white space" but should not
be in any other case - unless set explicitly of course.)

Plus more cosmetic changes - the man page and usage are updated to make it
more clear that the 2 (or 1) params to -k are not fields (field1 and field2)
but specifiers of the beginning and end of one key field.   There was an
unused 'x' option in the GETOPTS string.  The usage message is reformatted
to display properly on both 80 col and > 80 col displays (on < 80 it will
still probably look pretty ugly ... perhaps not quite so bad though), and
is also updated to show the different usage for the -c case (and -C) from the
others (only 1 file permitted) - the man page synopsis has a similar update.

Using more than one of -c -C or -m generates a usage message rather than
just ignoring the -m as it did before (there was no -C before of course).

Aside from the bug fix to the interaction between -R and -t, there are no
changes that affect the way anything is sorted (or read, or written).

Discussed on tech-userlevel earlier this week.
2016-06-01 02:37:55 +00:00
christos 71229fdd60 Symbolic printing for mmap 2016-06-01 00:47:16 +00:00
pgoyette ed42ce54d9 Move __MKTEMP_OK up earlier so it has an actual impact. Reduces the
number of warnings during build.

XXX There are still some other warnings remaining to be resolved.

Fixes PR bin/48195 although we really should go back someday and fix
this correctly (by replacing all uses of mktemp(3)!)
2016-05-31 06:55:02 +00:00
dholland 96e4b50290 Use this program's Strdup() instead of strdup() so it exits on failure
instead of dumping core.
2016-05-30 16:35:35 +00:00
dholland 7ad91fe4a4 Use rewind() instead of freopen()'ing the same file for no reason. Also,
close the file when done instead of dropping it on the floor. Obsoletes
PR 50579.
2016-05-30 16:26:34 +00:00
christos c2dcc0c09c Don't make crunch binaries PIE 2016-05-29 16:12:58 +00:00
abhinav 743e3b4551 md5 is a hashing algorithm, don't say it is used for encryption.
Ok by wiz@
2016-05-24 06:15:43 +00:00
christos 8ed051d1e1 put back _PATH_WHATIS, it is used. 2016-05-21 20:54:34 +00:00
abhinav aa0cdec039 Remove unused include and unused constant. Ok from christos@. 2016-05-21 17:21:40 +00:00
sjg ccfdc94797 Propagate errors from filemon.
If we encounter errors producing a .meta file,
we should not consider the target completed successfully.
2016-05-12 20:28:34 +00:00
ozaki-r 278a4a7caa Remove duplicate routing flag list
We alreay have it in route(8) and shouldn't have another one.
(Actually the removed list is forgot to be updated.)
2016-05-12 03:44:11 +00:00
nonaka 048f8f1c7c If the negative number is passed to option '-c' or '-n',
it should occur an error.
2016-05-12 01:56:44 +00:00
sjg 1ea1c693f3 Allow for ignoring paths that match a set of patterns.
This can be expensive, so use with caution.
2016-05-10 23:45:45 +00:00
sjg 83317c9428 Apply realpath() to p before matching against metaIgnorePaths. 2016-05-10 00:02:31 +00:00
wiz 4b483a8522 New sentence, new line. Bump date for previous. 2016-05-02 09:33:15 +00:00
mlelstv 6fc95ff617 Extend syntax of config phrase, a quoted string instead of a device name
is passed as root specification string. This can be used to specify a
wedge by name.
2016-04-29 18:18:22 +00:00
riastradh feb61835e6 __diagused, not __unused -- used in an assert. 2016-04-07 23:29:59 +00:00
gson 4efe3992f9 Fully avoid the nonstandard types u_char, u_int, and u_long, which
were only used inconsistently in a few places anyway.
2016-04-06 09:57:00 +00:00
sjg f5cd368fff Skip looking for .MAKE.JOBS if either of compatMake or forceJob is true.
If -B compatMake will be true and should be honored.
If -j forceJobs will be true and the command line supplied .MAKE.JOBS
should be respected - for consistency with other usage.
2016-04-05 04:25:43 +00:00
christos 7a955c4ce5 PR/49872:Yorick Hardy: sed functions 'i' and 'a' discard leading white space
FIxed as suggested, behavior now matches gnu-sed.
2016-04-05 00:13:03 +00:00
christos b1bf748a07 PR/51043: Yorick Hardy: ftp(1) should use the port number for CONNECT 2016-04-04 23:59:41 +00:00
ozaki-r 09973b35ac Separate nexthop caches from the routing table
By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
  - sysctl(NET_RT_DUMP) doesn't return them
  - If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
  - RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
  - It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
  - -[no]cloning remains because it seems there are users
  - -[no]connected is introduced and recommended
    to be used instead of -[no]cloning
- route show/netstat -r drops some flags
  - 'L' and 'c' are not seen anymore
  - 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
  a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
  http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html
2016-04-04 07:37:07 +00:00
knakahara 11bfe22fab ' != " so make the condition actually work. (same as r1.30) 2016-04-01 07:23:15 +00:00
alnsn 38047b2736 Don't enter infinite loop on big ktr_len values.
Fixes PR 49460.
2016-03-27 21:51:20 +00:00
christos f3a6400cd0 sprinkle more volatile (distribution build with gcc-5.3) 2016-03-18 18:42:25 +00:00
christos 0f160f0ea7 match the updated <sys/types.h> definition 2016-03-18 15:05:49 +00:00
christos e5012983f9 CID 1356387: Wrong sizeof 2016-03-16 21:01:28 +00:00
matthias 6c56f993ef honor setting .MAKE.JOBS from the makefile. That way one can e.g. do:
CPUS!=sysctl -n hw.ncpuonline
.MAKE.JOBS?=$(CPUS)
2016-03-16 16:04:44 +00:00
sjg 2271de011e Fix syntax 2016-03-16 00:19:01 +00:00
matthias 5c97c6933e Another small change to make archive member rules work. With this change
archive member rules seem to work as expected again.
2016-03-15 18:30:14 +00:00
matthias 7215e4a264 dynamic dependencies for library member targets are working again. 2016-03-15 06:25:14 +00:00