Commit Graph

13435 Commits

Author SHA1 Message Date
christos 5326356364 refactor includes, add <sys/stat.h> 2017-01-10 21:13:45 +00:00
christos a80110f6b6 need <sys/stat.h> 2017-01-10 21:08:48 +00:00
wiz 4e70675da5 Document --keep. From Timo Buhrmester <fstd.lkml@gmail.com> on netbsd-docs.
Use more macros while here.
2017-01-08 14:18:31 +00:00
christos d106d90e70 add pcs 2017-01-07 18:28:49 +00:00
ryo 55563c97ca "vmstat -ie[v]" auto fit to minimum columns
Reviewed by msaitoh@
2017-01-05 07:53:20 +00:00
pgoyette c0a30d4dc7 Adapt to use of bintime(9) for kernel history timestamps (7.99.55). 2017-01-05 03:42:27 +00:00
pgoyette 09c45791e2 Fix error handling confusion between error and errno 2017-01-04 01:29:18 +00:00
pgoyette 394eed3eed Adapt to new version of the sysctl export structure 2017-01-04 01:06:26 +00:00
pgoyette 58e3ff39b3 Use appropriate PRI* format specifiers for fixed-bit-size numbers
Should fix i386 build.
2017-01-02 09:24:54 +00:00
pgoyette ba8c50ff8b For kvm-based kernhist code, print size of history table and "next free"
pointer, same as we do for sysctl-based code.
2017-01-02 02:08:05 +00:00
pgoyette 6a4fc5e568 Restore the kvm-grovelling code for use on crash files (where sysctl(3)
is not available).  Otherwise, this would always report on the current
running kernel regardless of the use of -M option.
2017-01-02 01:48:56 +00:00
pgoyette 93058c7f3d For kernel history display, replace the kvm grovelling with the newly
available sysctl access to the history data.

XXX vmstat still uses kvm for several other displays
2017-01-02 01:02:19 +00:00
dholland 4e631407ca PR 51754 Charlotte Koch: fix -v output of config parser. 2016-12-31 10:13:15 +00:00
christos f51d1f25b9 Print the interface for bpf. 2016-12-30 21:08:23 +00:00
christos c9601077e7 - add buffer bounded attribute
- allow empty attributes
2016-12-30 19:53:08 +00:00
christos 4f56be094e sort, kill typo 2016-12-30 03:36:51 +00:00
christos b79407b5a4 add bounded, fix nonnull 2016-12-30 02:16:36 +00:00
christos 3e691a5244 fix __typeof 2016-12-30 00:57:10 +00:00
christos b29ce927f5 handle __ symbols differently (so we don't duplicate entries in the table)
and add non_null.
2016-12-29 23:54:29 +00:00
mrg 1383c0c74f build vmstat as n64 on mips64. only kernel histories and hash stats
need to be fixed fot this to be reverted.
2016-12-29 23:42:38 +00:00
christos ab5bdf51ae only return attributes if looking for attributes 2016-12-29 19:40:35 +00:00
christos 9ef948be1d allow cascaded attributes 2016-12-29 19:40:21 +00:00
christos a4c7faa796 Add alias attribute 2016-12-29 18:44:49 +00:00
christos 28617f6731 Add always_inline 2016-12-29 18:37:32 +00:00
christos 8deef5e5f2 Add more attributes. 2016-12-29 16:41:16 +00:00
christos a6761f0073 accept optional type attributes after struct/union members 2016-12-29 16:01:46 +00:00
christos 502c644dd9 teach lint __attribute__((__unused__)) 2016-12-27 21:52:35 +00:00
christos b074a61a87 - use UTC
- initialize tm_isdst
- use accpath to handle relative paths
2016-12-26 14:53:17 +00:00
wiz d2bf829be4 Whitespace, sort, remove some superfluous macros/quoting. 2016-12-25 11:10:53 +00:00
christos 90c8a9f073 Add -R (source filename remapping) for MKREPRO 2016-12-24 17:43:45 +00:00
abhinav 842412540f Update the description of the -t option to bring it in sync with IEEE 1003.1 -2008.
The .SS field of the datetime argument of -t option can have range from 0 to 60
as per the 1003.1 2008 standard. POSIX has removed all mentions of double leap
seconds, therefore the allowed range of seconds is now [0,60].

Also, add an ENVIRONMENT section, as the interpretation of the datetime
argument in -t option depends on the TZ environment variable.

Add an xref for parsedate(3) in SEE ALSO.

ok wiz@
2016-12-24 15:49:18 +00:00
mrg 0537635d0c for 64 bit mips platforms where we built userland largely as n32 by
default, build a handful of tools as n64 so they work properly.

unfortunately, they're also static as dynamic n64 has a problem.

of these tools pstat is probably the lowest hanging fruit to convert
to sysctl.  systat would be close were it not for the netstat screen,
which includes netstat itself.

the rest are difficult to perhaps foolish.


the upside is that netstat, pmap and fstat all work properly now.
2016-12-23 10:19:57 +00:00
mrg 20c21f9f52 in getpcblist_sysctl() if sysctlnametomib() fails, return NULL and
set *len = 0, rather than bailing.  now "netstat" doesn't give up
early on kernels without INET6.
2016-12-23 06:22:00 +00:00
mrg 65d0ad5f99 add the member name to an error string so we know what object failed
while being requested.
2016-12-22 22:41:02 +00:00
abhinav 2faad91b8c Instead of saying "The finger displays information..." say "The finger utility"
(not sure if it was intentionally written like that :)

Also, add an xref to fingerd(8)
2016-12-22 12:39:40 +00:00
abhinav 59fbdd4908 Add an xref to wait4(2) in SEE ALSO as it has been referred to for the -l option. 2016-12-21 18:01:21 +00:00
abhinav fa0751d0dd Add missing full stop. 2016-12-21 09:06:24 +00:00
abhinav 1ccf3ec022 Update SYNOPSIS to reflect that y and n options are mutually exclusive.
Also, mention what does biff(1) do if no arguments are given.
Add xref to from(1)

ok wiz@
2016-12-20 08:21:32 +00:00
christos f015338360 print only the latest entry for debugging. 2016-12-19 01:48:00 +00:00
mlelstv d19ac03c1e Print previously missing fields from a TCP6 PCB. 2016-12-17 09:12:22 +00:00
nonaka a69e0947f2 handle proxy authentication correctly. 2016-12-15 04:49:15 +00:00
abhinav 27174a0ec3 Add a HISTORY section
Move information about exit status to EXIT STATUS section
Add more xrefs

ok wiz@
2016-12-14 15:24:06 +00:00
mrg 2c22342178 copyright and date maint. 2016-12-11 08:40:10 +00:00
christos 34152e53bb Back in 1993 ${MACHINE} was a unique way to define objdirs for
every platform. Thus setting OBJMACHINE, allowed one to keep
in-tree objdirs with multiple builds. With the advent of evb*, this
has become impossible until now. Introduce OBJMACHINE_ARCH that
adds ${MACHINE_ARCH} to the objdir so that we have unique objdirs
per build again. Until we restructure things to that this is not
necessary, it is the simplest fix.
2016-12-10 23:12:39 +00:00
sjg f65fa017b9 Avoid coredump for
(FOO) = fu

reported by Ori Bernstein
2016-12-09 22:56:21 +00:00
nat 82924a36bf The audio sub-system now supports the following features as
posted to tech-kern:

    * Simultaneous playback and mixing of multiple streams
    * Playback streams can be of different encoding, frequency, precision
      and number of channels
    * Simultaneous recording to different formats
    * One audio device per process
    * Sysctls to set the common format frequency, precision and channels
    * Independent mixer controls for recording/playback per stream
    * Utilizes little cpu time for multiple streams / good performance
    * Compatible with existing programs that use OSS/NetBSD audio
    * Changes to audioctl(1) to allow specifying process id for corresponding
      audio device
2016-12-08 10:28:44 +00:00
christos 87fc2c3144 Don't apply the suffix (curdir) to MAKEOBJDIR 2016-12-07 19:57:09 +00:00
christos c977da2cd4 Refactor and simplify objdir setting code. 2016-12-07 15:00:46 +00:00
jnemeth 85fec0c0ed update floating holidays for 2017 in preparation for pullup for 7.1 release 2016-12-06 04:54:00 +00:00
mrg 15bdea6a19 add a basic "-b" option - that outputs one display and exits.
inspired by "top -b".  still requires a curses-capable output
without some fairly significant internal restructuring.
2016-12-03 03:26:27 +00:00
christos 9896a45fe7 fix leak. 2016-11-24 17:12:23 +00:00
dholland 950f040fa2 Fix "sidewaysintpr", the thing that prints interface statistics in a
loop, to use signals properly. There are two copies of this code; one
uses kvm and the other uses sysctls. One copy had been updated to use
sigset_t and sigsuspend; the other was using vintage sigpause(). Sync
up the code so both use sigpause. Also, use sig_atomic_t, and block
SIGALRM when not waiting for it to avoid a small and unlikely but real
race.

Since the non-modernized copy of the code *had* for some been
modernized to use setitimer instead of just alarm(), propagate that
change to the other copy.

These copies could share more logic than they do.
2016-11-24 00:05:13 +00:00
abhinav cac7393582 Oops, it should be Aq Mt email@address
(Thanks again wiz :-)
2016-11-18 12:16:48 +00:00
abhinav 739865b984 Use .An -nosplit
Also, use Mt for email addresses.

(Thanks wiz)
2016-11-18 10:11:34 +00:00
abhinav 5644a41214 Use more markup and complete a sentence. 2016-11-18 09:06:35 +00:00
christos 83aa60eb00 if there is more than one : it is not an X display, it is a v6 address 2016-11-16 02:03:30 +00:00
sjg 46bfaede57 Report node name rather than (null) when modified before src 2016-11-10 23:41:58 +00:00
christos b3ba15e2be Add _Generic C11 support. 2016-11-05 01:09:30 +00:00
kamil f26cf4cb48 Prefer modern simple past tense and past participle of catch
The "catched" form is obsolete and nonstandard, prefer "caught".
2016-11-03 22:08:30 +00:00
christos 7aaeae4638 fix usage (thanks wiz) 2016-10-30 19:33:49 +00:00
christos 1a5428f3fb add a flag to avoid mmap... 2016-10-30 19:13:36 +00:00
christos 4667eeb169 sysctlbyname is convenient, but ain't cheap. Cache it. 2016-10-24 00:40:17 +00:00
christos 8ff995f221 allow fractional intervals 2016-10-22 22:02:55 +00:00
christos 8481accb85 PR/51558: ast@: ftp dumps core after usage message when IPv6 URL lacks a slash.
Initialize variable so that we don't get random behavior on cleanup.
2016-10-17 00:52:53 +00:00
abhinav 77df47bda0 Fix the bug introduced in the previous commit.
The lengths of the lines being compared were not correct. Essentially, we
were comparing the length of the buffers instead of the length of the strings.

This patch also avoids calling skip() twice for the same line.

Thanks to Rin Okuyama for the patch.
2016-10-16 06:17:51 +00:00
abhinav 75088523c3 A small optimization: since we already know the length of the lines, check
if the lenghts are equal before calling strcmp(3). Most of the times, the call
to strcmp(3) can be saved if the lines are not of the same length.

Thanks to Christos for the reviews
2016-10-14 19:43:59 +00:00
dholland a76b73c7a0 typo 2016-10-13 06:22:26 +00:00
christos bb762fe5ee No point in using float here; makes evbmips64 need __truncdfsf2, and that
causes static linking issues because of softfloat.
2016-10-04 17:36:21 +00:00
joerg 740128222b When using data outside the signed char range, it is better to
consistently use an unsigned char buffer.
2016-10-04 15:06:31 +00:00
joerg 5937818688 GC header left from earlier diagnostic test. 2016-10-04 14:36:11 +00:00
joerg 2f2a5be7f3 Remove source routing support. 2016-10-04 14:35:38 +00:00
wiz 89ab2da6d9 Minor improvements, add more markup. 2016-10-03 08:20:12 +00:00
kamil b3c98abce0 Import c11(1) - a cc -std=c11 wrapper
This script is similar to c89(1) and c99(1).

It's a NetBSD extension. The c89(1) and c99(1) scripts are part of POSIX.
2016-10-03 01:00:27 +00:00
abhinav 961fb352ab Move information about exit values from DESCRIPTION to EXIT STATUS section.
ok wiz@
2016-10-02 21:06:18 +00:00
christos ea8949d86b define the attribute first. 2016-09-13 16:06:59 +00:00
christos 3a8503931f Make attribute deselection work:
- when deselecting attributes, remove files that depend on them
- when deselecting attributes, remove devices that depend on them
2016-09-09 21:09:11 +00:00
sevan 39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
christos 1d13ed3d99 ignore the abiflags section 2016-09-03 11:35:24 +00:00
dholland ab2acfdda8 storage class first, *then* __dead 2016-09-03 06:00:32 +00:00
dholland eb640195f5 simplify __dead usage 2016-09-03 05:58:30 +00:00
dholland 0a533596ca __dead should come first; also remove more K&Risms. 2016-09-03 05:56:59 +00:00
dholland e7afde8f0f simplify __dead usage 2016-09-03 05:50:06 +00:00
sevan f237858c5d Remove K&R __P macros.
Remove main() function prototype if present.
Mark usage() as __dead if not already.
Binaries generated with & without these patches were compared with diff -r.
2016-09-03 02:24:04 +00:00
dholland 7f48560292 Document .DELETE_ON_ERROR. 2016-08-26 23:37:54 +00:00
dholland 9d33465685 Add a .DELETE_ON_ERROR: magic target that causes *failed* targets as
well as *interrupted* targets to be deleted. The name and behavior of
the variable matches gmake.

Also fix a glitch in newline output on error in compat mode that I
discovered while doing it.

Closes PR 51376.
2016-08-26 23:28:39 +00:00
christos c634867ea2 compute anonymous bitfield sizes properly. 2016-08-23 16:42:55 +00:00
sevan b99eec368e Add AUTHORS section
bump date
2016-08-22 00:15:59 +00:00
christos b8f79638e1 Don't warn about empty structs twice. 2016-08-19 11:51:27 +00:00
christos 175128e719 be less aggressive in clearing blocks to protect against:
int
main(int argc, char *argv[])
{
	int rv;

	if ((rv = ({ int _ret = 1; if (argc == 1) {} _ret; })) != 0)
	    printf("%d\n", rv);
	return 0;
}
2016-08-19 10:58:15 +00:00
christos ab22712dbd Add union casts. 2016-08-19 10:19:45 +00:00
christos c6347f3a1e add a type comparison function. 2016-08-19 10:18:11 +00:00
sevan fbe5805edc seq(1) first appeared in Research Unix 8th Edition, which was before Plan 9.
Generalise in stating that this version is not bug for bug compatible with other
implementations.
Bump date.
Via FreeBSD bug 181390 with feedback from Warren Block.
2016-08-18 22:55:28 +00:00
wiz e20c5869bb Whitespace. 2016-08-18 19:23:20 +00:00
christos 9acbaa9544 - handle sizes of structs/unions with anon members
- handle structs/unions with only anon members
2016-08-18 14:43:31 +00:00
christos 9c8f3871d5 anonymous members are C9X 2016-08-18 14:42:48 +00:00
mrg 4ffdae42fa don't hide _DEV_IC_BT8XX_H_ inside DTRACE. 2016-08-18 08:02:58 +00:00
sjg 2e603a118c Refactor the handling of .MAKE.META.IGNORE_* to meta_ignore()
so that we can call it before adding paths to missingFiles.
Ie. do not track files we have been told to ignore.
2016-08-17 15:52:42 +00:00
sjg 69fc18aad5 Add .MAKE.META.IGNORE_FILTER to allow more complicated filtering of filemon data.
The filter is applied to paths Read or Excuted, and if it expands to
nothing, the entry is skipped.

For example; dirdeps.mk can set this to:

.MAKE.META.IGNORE_FILTER = M*/${.MAKE.DEPENDFILE_PREFIX}*

when checking if DIRDEPS_CACHE is up to date, where only Makefile.depend*
are of interest.
2016-08-15 19:20:17 +00:00
sjg 53f61e0d2c PR: 51405
Description:

addErrorCMD: in compat mode, cmdp may be NULL, skip it
and stop the calls (return 1).
2016-08-11 19:53:17 +00:00
sjg 374771b4a4 Set .ERROR_CMD if we can 2016-08-10 23:49:12 +00:00
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