Commit Graph

8921 Commits

Author SHA1 Message Date
christos
e0b8cfed06 Coverity CID 2287: Fix memory leak.
Plus:
	- change fprintf -> errx
	- remove unneeded casts
	- avoid err() shadowing
2006-04-03 15:21:26 +00:00
tls
374e37364a Move "cucommon" label (ugh) to above the O_NONBLOCK handling for direct
connections.  This stops the tipout process from spinning.
2006-04-03 14:54:16 +00:00
christos
cb82eb0f6b Redo the previous in the tip sanctioned way :-) 2006-04-03 14:12:29 +00:00
martin
d6d78510c3 printf format fixes for 64bit archs 2006-04-03 13:30:24 +00:00
he
3a81e1c420 For the benefit of our 64-bit ports, we need to cast via intptr_t when
casting from pointer to unsigned int.
2006-04-03 13:00:48 +00:00
scw
34b4a96dbb Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.
2006-04-03 08:15:48 +00:00
wiz
e9a003bced Use Dq, punctuation vs whitespace nits. 2006-04-03 05:56:20 +00:00
yamt
e6e5a0e51b actually set up baudrate after rev.1.33. 2006-04-03 05:08:40 +00:00
yamt
25e67975a5 fix a typo in LINKS. 2006-04-03 05:05:55 +00:00
christos
c4341bc3e1 Pass a little lint. 2006-04-03 04:53:58 +00:00
perry
29dc02e572 delinting. more needed. (lint found some real bugs that I haven't fixed yet.) 2006-04-03 04:25:30 +00:00
perry
b43b6e6666 Merge a few of the OpenBSD manual page changes. Not yet close to
finished but I have to break for now and Thor will probably pick up
from where I left off.
2006-04-03 03:46:34 +00:00
tls
125606b781 Wwwwwwww! Do not remove variables from the vtable in vars.c without
changing the indices in tip.h -- what a terrible design.

Okay, "design".  Fine.  Whatever. ;-)  Now we don't dump core all the time.
2006-04-03 03:13:10 +00:00
perry
31f14bb93a Clean up a bit. 2006-04-03 02:33:19 +00:00
perry
d71f683e39 Remove vestiges of the ACULOG support. It depended on the suid support
(which is now gone) and it is woefully obsolete -- if something
analogous is ever needed in the future, syslog is the way to do it.
2006-04-03 02:25:27 +00:00
tls
bc4c5be2bf Now we use tip-as-cu, not Taylor UUCP cu.
These programs are no longer setuid, and now lock devices with flock,
not file locks in /var/spool/.  They will no longer lock against UUCP
itself unless we modify UUCP to lock with flock, but this seems highly
unlikely to be an issue in the present day.
2006-04-03 02:21:13 +00:00
perry
8a1d2efb73 remove refs to uucp locking and aculog 2006-04-03 02:14:26 +00:00
tls
6bd8b21472 The ~C / ~+ command is no longer optional. 2006-04-03 02:06:44 +00:00
perry
eee85da04c Remove support for uucp style locking.
This means we can get rid of the suid/sgid parts of the code (which
have been removed). The program is now installed with normal permissions.

To prevent accidents, we now flock the tty line, attempting to get an
exclusive lock.

Reviewed by: tls
2006-04-03 02:01:28 +00:00
tls
896b79dbc8 If we're not given a phone number or system name to dial, use "direct
connect" mode -- in other words, set CLOCAL so the user can talk to the
device before CD.
2006-04-03 01:48:22 +00:00
tls
bed8070daa Whoops. We don't *use* log.o, so don't *build* it. 2006-04-03 01:47:20 +00:00
perry
58c2151f1e ANSIfy decls, de-__P, clean trailing whitespace 2006-04-03 00:51:13 +00:00
tls
4c0b53d7b4 At Luke Mewburn's suggestion, disable "force" by default, too. Those using
the tip frontend who really want ^P used for "send literal" can turn it on
in tiprc or remote.
2006-04-02 23:25:35 +00:00
tls
edddcc4ac8 Add another Taylor compat option, --nostop to disable software flow control
(a.k.a. "tandem" mode).  While we're here, fix a buglet with --halfduplex,
and add --flow {hard, soft, none}.  Note that you can't get *both* hard and
soft flow control using the command-line option; if you want that, you
have to set the variables in tiprc or with ~s once tip is running.

Move all setting of vars.c named variables to *after* the call to vinit().
2006-04-02 22:19:26 +00:00
tls
da6a898cf6 Oddly enough, smashing CRTSCTS into the terminal input flags doesn't do
much; it is a control flag.

Now toggling hardware flow control works.
2006-04-02 20:44:20 +00:00
tls
6b0f06d935 Fix the conditional compilation on ACULOG so it actually works.
Turn it off by default -- it hardly saves any space, but it's
one of the reasons why the executable is installed setuid, and
other versions of tip/cu don't write a log file anyway.  We can
add syslog support later if we ever really want this back, the
file-writing is all encapsulated in log.c.
2006-04-02 19:16:22 +00:00
tls
ad69069bcc New 'cu' command-line handling, derived from Todd Miller's in OpenBSD,
but with some long options added for Taylor 'cu' compatibility, and
with some bugs fixed (in particular, the handling of -# now works as
documented and does not overwrite argv).
2006-04-02 19:04:24 +00:00
tls
0b7476a655 Remove extra \n from call to warn() 2006-04-02 19:03:55 +00:00
tls
b3de57c6bf Don't build any of the dialers except Hayes. If anyone is using any of
the others (maybe "Courier", but I doubt it) we can easily enough turn
them back on.

Saves 20-30K depending on platform.  Not totally insignificant, since this
often goes on install media, or very small systems.
2006-04-02 19:00:40 +00:00
tls
b8dc57b8d9 If we might have two links, we'd better print our program name when we
emit an error -- and it would be nice if it were the *right* program name.
Since it's convenient, change most perror calls to warn, and a lot of
fprintf ...  exit to errx.  Fix at least one fprintf that could run off
the end of its arguments (%s but no argument, how did we never catch this?).
2006-04-02 06:11:45 +00:00
tls
82222cd3ac Default to no parity instead of even parity. OpenBSD made this change
long ago, and I think it makes sense.
2006-04-02 04:28:38 +00:00
tls
685d2e5048 Default the "raisechar" value (for the insane old case-mapping) to NULL.
As the same change in the OpenBSD tree says, "if you are crazy enough
to want it, then it can be turned on in /etc/remote."
2006-04-02 04:25:36 +00:00
christos
df58c5cd15 Coverity CID 1660: Plug memory leaks. 2006-04-02 04:17:08 +00:00
tls
8139858166 Default baud rate to 9600 (was 1200) to match Taylor cu. 2006-04-02 04:10:54 +00:00
tls
7d1bef10da Add the rest of the speeds listed in termios.h. This is not, perhaps, as
sensible as the way OpenBSD supports arbitrary speeds; but we hardly add
new speeds often and this change is a lot less invasive.
2006-04-02 04:02:00 +00:00
christos
ceb6edafa6 Coverity CID 922: Fix check against NULL. 2006-04-02 03:50:38 +00:00
christos
472d6fbe72 Coverity CID 878: Remove impossible tests against NULL pointers. 2006-04-02 03:47:26 +00:00
christos
999d9f8f32 Coverity CID 1181: Protect access against NULL. 2006-04-02 03:40:06 +00:00
christos
002be29d1a Coverity CID 2290: Fix memory leak. 2006-04-02 03:33:55 +00:00
christos
095e4da292 Coverity CID 1204: Prevent negative index. 2006-04-02 03:29:17 +00:00
christos
6e2787485e Coverity CID 2336: Fix memory leak. 2006-04-02 03:19:34 +00:00
tls
40bdc77642 Change manual page (as OpenBSD did) to reflect the actual arrangement of
file descriptors with ~C, instead of some weird ancient arrangement.

Document ~+ as a synonym for ~C.
2006-04-02 03:15:02 +00:00
tls
b389579aca Add "~+" as a synonym for "~C" for Taylor cu compatibility. 2006-04-02 03:10:54 +00:00
christos
8533275dab Remove bogus debugging code I accidentally committed. 2006-04-02 00:15:53 +00:00
christos
46c0b8e98a PR/26804: Jason Thorpe: Make PT_DUMPCORE require the process to be PT_ATTACH'ed
first so that it is stopped and there are no races.
2006-04-01 22:34:00 +00:00
jmmv
43e0f4ee96 Fix cross-reference to grep(1). 2006-04-01 16:12:23 +00:00
cherry
fb4fa95282 xlint for ia64 2006-04-01 09:39:47 +00:00
rtr
75de03412e cast line_len to (int) to avoid warn. 2006-04-01 06:36:58 +00:00
rtr
df14d9f34e revert previous to previous as it was correct 2006-04-01 06:31:43 +00:00
rtr
f738eedb64 change printf format from "%.*s" to "%.8s"
have to conclude it was what was actually intended in the previous change
2006-04-01 06:26:31 +00:00
christos
e052a053e4 Add some coverity allocation comments, and change the way the allocator
functions work. When they allocate storage that needs to be freed, instead
of setting a boolean, set the pointer to be freed. Plug some more memory
leaks found by inspection.
2006-03-31 21:58:08 +00:00
dsl
33369a0245 There is no need to count jobs and job tokens.
If we don't create the job pipe, use the '-j n' option to limit the number
of tokens we will remove from the pipe.
2006-03-31 21:05:34 +00:00
christos
ec5cc02622 Coverity CID 544: Fix memory leak. 2006-03-31 20:30:46 +00:00
dsl
ec40cf92c2 Rewrite parallel() so that it uses fgetln() instead of fgets() so that
horrid nasty things don't happen when the input lines are the same size
as the buffer.
Simplify by using an array of 'FILE *' instead of a linked list so that
is possible to appease coverty (SID:1598) by freeing the memory.
Also fclose() the input lines when they are consumed.
Code still modifies optarg strings....
2006-03-31 18:59:52 +00:00
dsl
0720992d8c KNF prior to fixing all the buffer overruns....
Coverty highlighted something else that doesn't matter!
2006-03-31 17:20:07 +00:00
dsl
3db763ccc3 MCDelSet() contains an infinite loop!
I suspect it has never, ever, ever been asked to delete anything that exists.
Also neither it, nor MCDelMsg() below free() the set and msg structures.
Found by Coverty SID:54
2006-03-30 20:32:10 +00:00
dsl
e4573e12e3 Simplify the way the end of a singly linked list is followed (for adding
items) so it is more obvious that we aren't going to indirect through
a null pointer.
Fixes coverty SID:101
2006-03-30 19:53:58 +00:00
dsl
4c18b91e3e If fgetln() returns a buffer that isn't terminated by \n, free the temporary
buffer inside the loop.  Fixes coverty CID:1674.
(This should only happen at EOF, so the loop SHOULD terminate.)
While here always output a newline at the end of the input data even when
the last (unterminated) line doesn't contain a separator.
2006-03-30 19:17:44 +00:00
rpaulo
a0713f21de ANSIfy. de-P. 2006-03-29 15:40:49 +00:00
yamt
01ef02441c pull the following change from OpenBSD
and bump date of the manpage.

    date: 2003/09/20 18:15:32;  author: millert;  state: Exp;  lines: +4 -2
    Implement hardwareflow varable in tip(1) like Solaris and hf in /etc/remote.
    Based on PR 3411 from Matthew Gream
    Also document "tandem" variable (XON/XOFF) in tip man page.
2006-03-29 12:37:59 +00:00
cube
c002406624 Fix a broken conditional that confused coverity. It cannot happen, anyway.
CID 178.
2006-03-29 09:16:36 +00:00
ginsbach
a8cd0ffcee - Change where variable substitution is done when processing traditional
include statements so that if a variable expands to more than one file
  name make will "do the right thing".
- Add additional debug print

Reviewed by christos.
2006-03-28 17:41:35 +00:00
joerg
3e3d6f89bd Query kernel for maximum argument size instead of using ARG_MAX. 2006-03-28 14:27:41 +00:00
christos
3b6811d33b PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
    http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
2006-03-26 18:11:22 +00:00
hubertf
517eb6559a Remove unused variable 'salt'
Found by code inspection in one of my classes, not via Coverity :)

OK'd by christos
2006-03-26 16:45:33 +00:00
jld
42ddba8762 Correct logic error in wildcard handling, which was causing the
day-of-month on normal entries to always be treated as a wildcard.

Specifically, "if (x&(y|z))" is equivalent to "if ((x&y)||(x&z))", not
"if ((x&y)&&(x&z))", which latter is clearly what was intended.
2006-03-24 23:30:08 +00:00
wiz
7ee6cdd959 Serial comma, remove unnecessary .Pp. 2006-03-24 00:14:23 +00:00
reed
909919ef8b Briefly document output of the modstat utility.
(And update document date.)
2006-03-23 23:59:38 +00:00
reed
04a9318e11 Changing a comment only because the module interface version
is not 1 anymore.
2006-03-23 23:52:35 +00:00
wiz
02b5f03672 Remove some more old kerberos4 code. Simplify usage. 2006-03-23 23:49:07 +00:00
wiz
eb525bd07c Remove some more old kerberos4 code. 2006-03-23 23:44:15 +00:00
wiz
54cd24faa5 Get rid of more Kerberos 4 code. 2006-03-23 23:33:28 +00:00
wiz
f5a1361a8f Remove some more kerberosIV references. 2006-03-23 21:48:18 +00:00
christos
a6ee606509 gcc says case is missing, coverity says case not reached. Appease both. 2006-03-22 16:16:59 +00:00
christos
f88156c66b PR/33128: Martin Husemann: When login in on the console, SIGABRT is ignored
Both SIGINT and SIGABRT should be restored before executing the shell.
2006-03-22 15:36:49 +00:00
christos
ec4e36f798 Coverity CID 46: Remove dead code. 2006-03-22 02:17:52 +00:00
christos
4b41923ad3 Coverity CID 198: Remove dead code if INT_MAX == LONG_MAX 2006-03-22 02:14:03 +00:00
christos
ec166aba55 Coverity CID 199: make sure that rtp is not NULL before dereferencing. 2006-03-22 02:08:55 +00:00
phil
4617d0a2bf Kill NULL deref (CID: 871)
Plug fd leak (not caught by coverity).
2006-03-21 21:59:56 +00:00
christos
9731df7d2d make this compile again. 2006-03-20 23:13:51 +00:00
dsl
7ee2912cf6 free() intrnamebuf, intrname and intrloc on entry so we don't leak them
every time initvmstat() is called.
Change intrnamebuf to be static so this works.
Inspired by Coverty CID 2072 (incorrectly) reporting that the memory assigned
to intrnamebuf wasn't being freed.
2006-03-20 20:36:38 +00:00
elad
cd7d931d2e plug leaks, coverity cids 92, 93. 2006-03-20 17:18:06 +00:00
elad
c080c43ef1 plug leak, coverity cid 98. 2006-03-20 17:03:08 +00:00
elad
3e7dafb547 plug leak, coverity cid 94. 2006-03-20 17:01:26 +00:00
elad
6bceef66d3 - plug leak in generate_guard()
- plug leak in h_output(), coverity cid 100
2006-03-20 16:58:13 +00:00
christos
85e611dd01 Goodbye KerberosIV 2006-03-20 04:03:10 +00:00
gdamore
6af224c1b4 Support cross-building tn3270 from other OS' e.g. Solaris by hiding
_RCS and _COPYRIGHT macros in #ifndef HOST_TOOL, and defining HOST_CPPFLAGS
apropriately for host tools.  Approved by uwe@.
2006-03-20 01:34:49 +00:00
cube
6a6299eb8f Panic on an unlikely error condition. CID 177. 2006-03-19 23:36:10 +00:00
cube
e50e4ee4b2 Free a nvlist used temporarily.
Found by Coverity, CID 179 and 180.
2006-03-19 23:12:59 +00:00
jnemeth
4be1f2c6fd Fix Coverity run 5, issue 1931 -- memory leak. This was noted as being a
bug by cgilbert.
Approved by christos@.
2006-03-19 22:52:01 +00:00
cube
11820066f8 Close file on error. CID 176. 2006-03-19 22:34:44 +00:00
cube
8e4130e5ee Fix various resource leaks, all happenning on error situations (IOW,
shortly before exit(1)).  CIDs 181, 182, 183, 184 and 185.
2006-03-19 22:27:14 +00:00
cube
3eaff5cb14 Proper resource handling in mkmakefile().
Coverity CIDs: 186, 187, 188 and 189.
2006-03-19 16:27:13 +00:00
wiz
59ba5fe8d1 New sentence, new line. 2006-03-19 10:45:03 +00:00
rtr
739b734996 the preceeding loop does not terminate except in a condition where
kp != NULL therefore testing if kp is == NULL after it is pointless
coverity 2446 / run 6
2006-03-19 06:10:22 +00:00
rtr
880b6df674 avoid double fclose()
coverity 2577 / run 6
2006-03-19 05:01:48 +00:00
rtr
d9da031351 remove ambiguity in evaluation of conditional expressions and avoid
double fclose().
coverity 2713 / run 6
2006-03-19 04:34:19 +00:00
sjg
98b766c482 Fix :P modifier so it actually works as described.
I.e ${var.c:P} should expand to the absolute path of var.c found via .PATH
2006-03-19 01:54:21 +00:00
sjg
8af5ec82ab Document an interesting kwirk in := handling of undefined variables. 2006-03-19 01:53:01 +00:00
dsl
1655d9a820 Code to display per-system call counts.
Very useful to help identify which code is doing 1000s of system calls.
Not built because no one else has a kernel yet, and I need to make
the kernel side configurable.  But I don't want to lose this code....
2006-03-18 20:31:45 +00:00
dsl
efc0bc90c3 Count both read bytes and write bytes when we are not showing separate read
and write statistics.  Discovered by go.
Since I broke in in rev 1.31, I guess I'll fix it first!
2006-03-18 16:48:44 +00:00
dsl
bee1c2beb6 Make the functions that display the top 8 lines externally visible so
they can be used to head other pages (not ready to commit yet...).
Use puthumanint() for oversize numbers when display_mode is RUN or BOOT (when
very big numbers are to be expected).
Allow an extra column for Csw..Flt.
Adjust some #defines to avoid use of global s & s1.
2006-03-18 14:58:49 +00:00
dsl
2769bb6a26 Coverty 1212: Avoid close(-1). 2006-03-18 11:15:00 +00:00
dsl
f9603a44ea Coverty 7449: Remove splurious check for 'sep == NULL'. 2006-03-18 11:02:48 +00:00
christos
22983123c5 Coverity CID 2341, 2342: Plug memory leak. 2006-03-18 09:46:35 +00:00
ginsbach
ccae083c7b Fix Coverity CID 1248, negative return from read() passed() to write()
as a large unsigned value.
2006-03-18 03:40:51 +00:00
ginsbach
1a75882940 Fix Coverity issue 1236, negative return from read() passed to write()
as a large unsigned valued when read() is interrupted (errno == EINTR).
2006-03-17 21:52:41 +00:00
ginsbach
7ee29c7f81 Fix Coverity issue 1564, resource leak, dynamically allocated storage not
freed before function return.
2006-03-17 21:19:24 +00:00
elad
cbe6a15c01 Another overrun forgotten in previous commit, also found by Coverity.
CID 1481.
2006-03-17 20:44:28 +00:00
elad
ab24a02ffe Fix buffer overrun found by Coverity, CID 1482. 2006-03-17 20:41:02 +00:00
christos
75f03570ec Coverity CID 2719: argvalue can be NULL when passed into functions.
De-obfuscate by undefining optarg, and check explicitly for NULL before
use.
2006-03-17 15:39:44 +00:00
rumble
0fe2cb9e42 Ensure that malloc does not return NULL before copying the buffer. 2006-03-17 04:53:55 +00:00
elad
9e505fa94b Fix two off-by-ones found by Coverity. 2006-03-17 01:55:31 +00:00
christos
d8a5b3caf5 warns=4 2006-03-16 23:25:17 +00:00
christos
f04bb5fddb warns=4 2006-03-16 16:49:07 +00:00
dsl
5f31eae781 nJobs and jobTokensRunning are both counting the same thing.
Kill nJobs and just use the count of tokens in use.
Don't eat job tokens when we are ignoring errors.
2006-03-15 20:33:19 +00:00
dsl
f26d89e3d9 JOB_FIRST is always set (since we only execute the shell once for every
target). Nuke it.
2006-03-13 20:35:09 +00:00
dsl
b85c051fa8 Remove the 'never non-NULL' 'previous' argument to JobStart.
Looks like it was intended as a minor (and pointless) optimisation to
remove a free() malloc() pair.
Make he comment about the stoppedJobs list more correct.
2006-03-12 20:14:56 +00:00
dsl
a484dfd693 It isn't possibly to execute any part of job.c that references compatMake
when it is 'true'.  So delete the unexecutable code.
2006-03-12 19:14:51 +00:00
dsl
c9b3912b1e Remove most of the code seemed to be there to support 'remote jobs'.
It isn't clear that it ever worked, if it did it has almost certainly
bitrotted in the last 12 years.  I'm not even sure all the required
components were present.
I suspect it was written to attempt to use a 'farm' of diskless sun3s.
In any case the apparant random assignment fo jobs to other systems doesn't
actually seem like a good idea!
Things like 'distcc' han be used to help slow systems run native builds.
Removing this code also simplifies make, and should let me speed up some of
its processing - without worrying about bitrotting it further.
2006-03-11 17:18:00 +00:00
christos
bc3a1c6523 PR/33054: Nicolas Joly: id(1) sometimes report a duplicate group when a user
is not specified. This is because it prints getgid() and getgroups(). If the
getgid() is in the getgroups() set, it was printed twice. This is now detected
and the duplicate printing is avoided.
2006-03-11 17:16:01 +00:00
wiz
904496fbc8 Markup fixes. 2006-03-11 12:02:20 +00:00
christos
5e6b1075e2 PR/33049: OKANO Takayoshi: Fix the spelling of NetBSD RCS tags. 2006-03-10 15:53:55 +00:00
dsl
5e60bf00ce Avoid calling JobRestartJobs() from the SIGCONT signal handler, instead
push a byte through the (now badly named) exit_pipe and call JobRestartJobs()
from the main code path when poll() wakes up.
Part of a plan to remove JobSigLock() and the zillions of system calls
it does.
2006-03-08 22:11:48 +00:00
jnemeth
1a6a87b59b PR/23616: Christian Biere: login might not back-off as expected 2006-03-08 03:09:04 +00:00
jnemeth
2e3c4f59d7 PR/23616: Christian Biere: login might not back-off as expected 2006-03-08 02:49:18 +00:00
hubertf
8c061da318 Xref pwhash(1),
pointed out by Stefan Schumacher at the Chemnitz Linuxdays
2006-03-07 01:52:09 +00:00
jnemeth
99089ba6f8 PR/30923: Zafer Aydogan: pam too verbose
Don't display a different message for root logins on insecure terminals.

Approved by christos@.
2006-03-06 23:06:18 +00:00
jnemeth
a2645cdaf4 PR/31059: Zafer Aydogan: login too verbose
Don't display a different message for root login on insecure terminal.

Approved by christos@.
2006-03-06 22:59:27 +00:00
christos
ef5477c67d Add PT_SYSCALL 2006-03-05 17:03:19 +00:00
christos
ac2addb00e PR/31144: YOMURA Masanori: pwhash -S/-b never use optarg 2006-03-05 08:50:58 +00:00
christos
57e9a1d730 PR/32978: Johan Veenhuizen: mail(1) creates record file with insecure umask 2006-03-03 15:07:00 +00:00
christos
463f84da0a PR/32964: Johan Veenhuizen: implement the unalias command 2006-03-03 13:36:27 +00:00
ginsbach
62221c2759 Code indentation fix up. 2006-02-28 17:17:43 +00:00
apb
f34c12e989 Make ".WAIT" apply recursively to all children of nodes on the right
hand side of the .WAIT, except when the recursive interpretation would
cause a cycle in the dependency graph.

Discussed in tech-toolchain.  Reviewed by christos, sjg.
2006-02-26 22:45:46 +00:00
wiz
3ea7f78b57 Fix typo. 2006-02-26 22:40:50 +00:00
sjg
701c9d99a7 Using ./bin in the test case, causes problems when 'make test' is
run from 'unit-tests' rather than the parent dir.
2006-02-26 22:20:55 +00:00
sjg
2bc18a45e6 Update man page and add test case for specifying modifiers via variable.
Also allow said variable to appear anywhere in the modifier list.
2006-02-26 21:43:00 +00:00
dyoung
dd269ac542 This patch removes one possible cause for a prolonged "out of disk"
condition on /tmp/:  if creating the file list ($FILELIST) fails,
immediately exit with a non-zero result code.  This fixes a bug
where, if the file list filled /tmp/, updatedb.sh would nevertheless
run for several minutes before it removed the file list as it quit.
2006-02-26 03:00:16 +00:00
simonb
bee087d4cc libcompat isn't needed any more here. 2006-02-25 12:00:24 +00:00
wiz
5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
wiz
91c57604ae Two improvements, from a diff from jmc@openbsd. 2006-02-25 01:19:22 +00:00
wiz
e60a6b4449 Wording, use more macros, xref grep(1). From jmc@openbsd. 2006-02-25 01:15:36 +00:00
wiz
5560f3fc8c Sort options; from jmc@openbsd. 2006-02-25 01:13:55 +00:00
jld
e1c2c022ba Fix typo ("program"). 2006-02-23 20:57:03 +00:00
dsl
2acc3971af Allow menu entry option names to be code fragments that (should) call
wprintw(menu->mw, ftm, args) to generate the menu label.
Allows static menu labels to contain the current value (like a lot of the
dynamic menus do).
Correct width calculations, and bound menu table lookup.
2006-02-20 21:06:40 +00:00
jschauma
a32f19d465 Add a new primary '-exit n':
This primary causes find to stop traversing the filesystem and
exit immediately if a previous condition was met.  If no value is
specified, the exit value will be 0, else n.  Note that other
primaries will be evaluated and acted upon before exiting.

Ok matt@, garbled@.
2006-02-20 16:31:02 +00:00
christos
63780e0b44 Propagate change from login.c where if getpeername succeeded, then we have
the sockaddr from the remote peer.
2006-02-20 05:05:16 +00:00
christos
539c95af37 PR/32873: Johan Veenhuizen: login(1) does not initialize lastlogx struct
properly
2006-02-19 00:48:34 +00:00
christos
e551462e89 PR/32870: Johan Veenhuizen: login(1) does not obey .hushlogin 2006-02-19 00:12:36 +00:00
tsutsui
8c30474280 Don't use data in freed stack. 2006-02-18 04:10:05 +00:00
sjg
051abc7bc4 Allow variable modifiers to be specified via variable. 2006-02-18 01:29:27 +00:00
sjg
555fff313b Fix enum for better portability 2006-02-18 01:28:48 +00:00
wiz
3a118ff7be Fix typo reported by Mathieu in PR 32846. 2006-02-17 06:56:15 +00:00
christos
10416487f0 Don't malloc/free the swap pointer with each refresh! Do it only if the
number of swap devices change. Now (and with the kvm fixes) top does not
allocate/free memory on each refresh.
2006-02-16 20:50:57 +00:00
tnozaki
f87e6eb1f0 make "locale -a" read locale.alias file. 2006-02-16 19:19:49 +00:00
jmmv
772e1db686 Adapt to some name changes in the tmpfs_node structure (to fix the build
under vax with gcc 2.95).  Provided by he@.
2006-02-16 14:58:35 +00:00
christos
2d51080a2d Do not attempt to generate moduli from moduli.c using the shuttle
suffix rule.  This can happen if moduli.c is newer than moduli.
Reported by Hisashi T Fujinaka.
2006-02-15 15:51:37 +00:00
apb
c5bdb87cca Escape dots in sed regexps. Without this patch, and without
an OBJDIR, "make test" in usr.bin/make fails.
2006-02-13 18:17:36 +00:00
kleink
2d52a8c98a Print system processes' command names in square brackets, like ps(1) does. 2006-02-13 16:01:58 +00:00
christos
557f9b049f PR/32799: David H. Gutteridge: Apparent off-by-one error in locate(1) causes
incorrect behaviour when entries with the maximum path length are encountered
2006-02-12 00:45:01 +00:00
dsl
2bfcea2ea3 Add some more debug prints. 2006-02-11 20:59:49 +00:00
dsl
e99202b6cf Actually SIG_DFL the correct signal (not SIGINT every time) just prior to
exec'ing a program in the child.
2006-02-11 20:58:53 +00:00
dsl
26ed52262a Delete obsolete static defn.
Trace number of unmade children on pass 1
2006-02-11 20:19:36 +00:00
cube
42b52b8a61 Add 'no config <name>'. 2006-02-11 20:15:53 +00:00
dsl
49c83bef6a Debug trace all the targets we are actually intending making.
De-optimise the getting of a job token so we don't re-order the job
list when there are no tokens.
This might have helped etc/Makefile, but isn't enough.
2006-02-11 18:37:36 +00:00
christos
62bee0ffa5 PR/32788: KAMADA Ken'ichi: add support for tmpfs 2006-02-10 16:01:45 +00:00
dogcow
86811edb37 change #include <sys/endian.h> => #include <machine/endian.h> so that
it's (more) consistent in the tree; this, along with changing tools/compat's
autoconf detection from AC_CHECK_FUNCS to AC_CHECK_DECLS makes the vast
majority of htobe16 and friends' redefinition errors bite the dust.
Tested with -current and FreeBSD.
2006-02-09 22:03:15 +00:00
manu
ee0c5b44de Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so
that the i386 license manager part of amd64 version of Fluent works.

While I'm here, add SysV IPC to COMPAT_LINUX/amd64
2006-02-09 19:18:56 +00:00
skrll
633207bbf9 Add scheduler activations upcall data to the default list of trace
points.

OK'd by christos.
2006-02-07 06:39:47 +00:00
dsl
0283f98333 Match changes to vmstat.c (splitting of dkreadstats).
Read tape stats if there are no disks found - is this possible?
2006-02-05 09:58:39 +00:00
dsl
228802f437 Split dkreadstats() into dkreadstats(), tkreadstats() and cpureadstats().
Similarly for dkswap().
Allows code to only call one of these.
Rename struct _disk to _vminfo to be nearer its contents.
Change 'systat vm' so that it always shows the 'current' cpu times, even
after ':run' or ':boot' commands. The code in vmstat.c doesn't support :run.
2006-02-05 09:54:50 +00:00
dsl
a6843277e3 Rename 'cur' to 'name' to avoid aliasing a global - this code has some
horrid globals...
2006-02-05 08:51:03 +00:00
he
9dfcf4d44d Rename debug to telnet_debug, to allow static linking with libssh.a. 2006-02-02 19:33:12 +00:00
martin
cf67045dd0 Do not use %d for size_t! 2006-02-01 20:26:28 +00:00
christos
76fc0d5b65 rename debug to ftp_debug. grr libssh. 2006-01-31 20:05:35 +00:00
christos
e22794108e Rename xfoo() to ftp_foo() to avoid collisions with libssh. Don't ask. 2006-01-31 20:01:23 +00:00
christos
643cfdb62a PR/32680: Yves-Emmanuel JUTARD: Improve some error checking that causes
memory corruption on out of memory errors.
While I am here, remove some lint.
2006-01-31 17:36:56 +00:00
christos
3ac7a40466 fix compilation after changes to telopts. I will revisit this and constify
it later.
2006-01-25 04:20:54 +00:00
wiz
bdd062fb4d Bring over changes I had committed to qsieve.6. 2006-01-24 19:17:19 +00:00
elad
c53cd0c067 moduli utils moved from games to usr.bin. 2006-01-24 19:01:45 +00:00
elad
e31e6187a9 Put qsieve/qsafe in usr.bin. 2006-01-24 18:59:23 +00:00
dsl
de841c2752 Make .NOTPARALLEL stop the job engine issuing more than one token (instead
of trying to de-jobify the make.
You can now put .NOTPARALLEL in a submake of a recursive make (where it is
using a job-token pipe from the outer make and have it only run a single job.
You can also specify .NOTPARRALEL in the root makefile of a large recursive
make and have the submakes run multiple commands.
Add some diagnostics printfs (enabled with -dp) to the parser.
2006-01-22 19:54:55 +00:00
christos
2309deb39e restructure as a single level if/then/elif/else 2006-01-22 15:47:10 +00:00
martin
f6234a13ab Do not access out of bounds argv when mixing non-getopt -<digit> arguments
with regular getopt-handled options.
Fixes PR bin/32596.
2006-01-22 15:24:38 +00:00
dsl
363c3a143d Check the 'job_pipe' for the error token 'E' before every job, including
the first one for each make.  This significantly speeds up the detection
of errors in other branches of the make (ie those running in a different
make process).  The cost of reading and writing a byte from the pipe
should be insignificant.
Defer replacing job tokens until we've decided there is an error.
If we detect an error in another branch of the make, then call Fatal(),
setting 'aborting' and failing to return a token leads to infinite loops.
Now parallel makes actually stop with the failing command on the screen.
2006-01-21 19:18:37 +00:00
garbled
c2c322c5a5 Apply patch from PR bin/23836 cmp did not correctly parse skip arguments
given in hex or octal, as the manpage states it can.
2006-01-19 20:44:57 +00:00
elad
ba1244744f sync usage(). 2006-01-15 16:50:05 +00:00
christos
9ebf619229 fix trailing blank munging. 2006-01-15 14:41:45 +00:00
christos
bd35911685 revert the line calculation as it used to be pre-buffer changes. 2006-01-15 14:26:10 +00:00
wiz
a67c9be512 warnx appends a newline, so the string does not have to contain one.
Remove it.
2006-01-13 20:30:40 +00:00
tsutsui
a46df0d20b Don't use data in freed stack. 2006-01-13 16:36:25 +00:00
wiz
9277c02ebe New sentence, new line. Bump date for previous. 2006-01-12 21:54:06 +00:00
wiz
1f5df3a237 Bump date for -e. 2006-01-12 21:52:01 +00:00
garbled
6a2b4183c2 Slight refinement of -t description. Note that it generates a template
with 8 X's.  Change .Bx Free and .Bx Open to .Ox and .Fx.
2006-01-12 21:39:45 +00:00
wiz
592cef634d New sentence, new line. Bump date for previous. 2006-01-12 21:00:58 +00:00
garbled
ddd39082c1 Apply patch from PR bin/28717
This adds a -e option to progress which causes the progress bar to be
sent to stderr.  This allows using progress mid-pipe, such as:
tar -cf . | progress -e bzip -1c | ssh host "cat > file"
2006-01-12 20:33:20 +00:00
garbled
f9abebf063 Applied patch from PR bin/14505 Tested on i386-current. Fixes inability of
cdplay to properly play a cd immediately following an eject command in
interactive mode.  Patch supplied by Sergey Svishchev.
2006-01-12 18:15:59 +00:00
tsutsui
dcf59f2ba1 Add dates of ews4800mips and 3.0 release. 2006-01-09 18:45:00 +00:00
dsl
8cc9d75901 Include the 'preds' and 'successors' in the diag output.
These are the values that are actually used to control what is built.
(I suspect .WAIT info added in the previous delta isn't always useful.)
2006-01-08 17:43:31 +00:00
dsl
07c6949e33 Don't (try to) use files marked .OPTIONAL as implicit sources.
There existance hasn't been verified at the point the implicit rules are
checked.
2006-01-08 12:59:52 +00:00
dsl
94a49912ba Include .WAIT in the debug output for dependency lists. 2006-01-08 11:54:13 +00:00
garbled
ee8c3b64e9 Add missing DPADD for LIBMATH 2006-01-07 07:12:27 +00:00
garbled
d8817d5ac1 Apply modified fix for PR bin/23763
jot(1)'s output now matches the examples given in the manpage.
2006-01-07 07:09:01 +00:00
christos
ed70dac6b1 add more const 2006-01-05 02:13:41 +00:00
christos
68e618cea2 more casts to void 2006-01-05 02:07:29 +00:00
christos
4d09f9add9 - use BUF_SIZE instead of BUFSIZ
- operator precedence in length calculation
- update buffer end pointer when buffer position does not change.
2006-01-04 22:05:26 +00:00
dsl
913c34c213 Expunge last references to jobTokensFree 2006-01-04 21:35:44 +00:00
dsl
1f61a1399d When a parallel make job completes, always put the job token back into the
job_pipe and collect another one for the next job.
If we are aborting, remove all the 'normal' job tokens and add an 'error' one.
If we get an 'error' token, remove any other tokens, re-insert the error
token and exit (with error 'cos that is easier).
Add the current pid to some of the DEBUG(JOB) traces.
Combined effect is that parallel makes actually stop some fairly shortly
after an error, rather than running on long enough to fill the scrollback.
2006-01-04 21:31:55 +00:00
dsl
261501b75e F_DUPFD the job_pipe fds onto higher numbers (>15) to make it less likely
that they will get closed in a complex recursive parallel make.
2006-01-04 21:25:03 +00:00
dsl
68ab653c0c For parallel makes, don't recycle the job token when we decide not to
run anything.
2006-01-04 21:16:53 +00:00
dsl
12dafa0b4a If -s (silent) is specified, don't output the target name before target
output in parallel makes.
After all with -s you wouldn't know the command for a non-parallel make.
Makes (sic) the output of parallel NetBSD build fathomable.
2006-01-04 20:56:05 +00:00
christos
e4a41ed570 fix problem introduced when the computation was changed to unsigned. If
we've exceeded the goal length already the negative number turned into
a large positive one...
2006-01-04 20:44:57 +00:00
perry
c9e98eabc1 de-__P, ANSIfy prototypes 2006-01-04 01:58:05 +00:00
perry
10e955c2f8 de-__P, ANSIfy prototypes 2006-01-04 01:44:06 +00:00
perry
d310ebb16a de-__P, ANSIfy prototypes 2006-01-04 01:30:21 +00:00
perry
ee5c979c9f de-__P, ANSIfy prototypes, and kill register 2006-01-04 01:17:54 +00:00
perry
c2e350ed82 de-__P, add ANSI prototypes, and a teeny bit of KNF. 2006-01-04 01:05:19 +00:00
garbled
0f9fab16a0 Fix a spello, and change the intent of the message slightly. 2006-01-03 00:15:45 +00:00
garbled
fd2134d98b Add repeat mode to cdplay(1) per PR bin/13970
Applied the second patch in the PR, with minor tweaking, and adjusted
manpage for change.
2006-01-02 21:29:53 +00:00
garbled
a25ab7d823 Change "garbled time" panic to a message that gives the user a better
idea of what happened.  Addresses PR bin/12463
2006-01-02 20:18:59 +00:00
christos
13d27fec78 recognize 307 redirect code. 2006-01-02 12:30:01 +00:00
tsutsui
1f5055228d Add preliminary support for System V Boot File System.
Written by UCHIYAMA Yasushi <uch@netbsd>.
2005-12-29 14:53:45 +00:00
rpaulo
fbe17c43c7 Bump date for previous. 2005-12-28 22:53:59 +00:00
christos
2296939e9c PR/32402: Jeffrey Bedard: pr filter dumps core with -s option specified,
when -s is specified with no argument. Option arguments in pr (as documented)
need to immediately follow the option. For example to set the separator char
to `.' you need to use "pr -s." instread of "pr -s .". The second form sets
the separator character to tab, and reads from file `.'. Coredumping is wrong
anyway, so fix that. Grr to POSIX for not forcing pr and a few other utilities
to use getopt(3).
cvs: ----------------------------------------------------------------------
2005-12-28 21:29:16 +00:00
rpaulo
fa0b253ddc Explain the netstat -B flag column. 2005-12-28 17:57:16 +00:00
yamt
87a5de2d3d add rcsid. 2005-12-27 11:29:30 +00:00
perry
f2bc845517 __inline__ -> inline 2005-12-24 21:44:28 +00:00
matt
d5eba984e9 Appease gcc 4.x 2005-12-24 21:14:50 +00:00
perry
0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
cube
c454f920b9 Having explicit locators is not a sufficient condition to be able to have
children for a pseudo-device.  Depending on an interface attribute is,
though.

Instead of looking at locators, walk the 'attrs' list and look for an
interface attribute (which might have been added just a few lines before
in case there was explicit locators defined).

Fixes PR#32329 by Valeriy E. Ushakov.  Regression test is PSEUDO_PARENT.
2005-12-18 23:43:15 +00:00
christos
267eeacec3 PR/32322: Daniel de Kok: Division by zero in column(1) with certain column
widths.
Cleanup and pass lint.
2005-12-17 18:10:55 +00:00
christos
630ea70860 use putchar consistently. 2005-12-16 04:20:09 +00:00
christos
75bdcdea65 small cleanups from seebs... 2005-12-15 22:37:37 +00:00
christos
9ac95763b7 PR/32305: seebs: Eliminate buffer overflows and simplify code by using
dynamically allocated buffers.
2005-12-15 21:32:00 +00:00
christos
dcf51e5c6a Use LOGIN_CAP even in the pam case. 2005-12-15 14:03:34 +00:00
christos
04095b6d82 PR/32307: Jason V. Miller: su fails to set umask correctly when using pam
and simulating a full login (-, -d, -l)
2005-12-15 14:01:31 +00:00
hubertf
9df5e26cc9 Give a general description what this command does before going into
all the details.
2005-12-15 05:26:36 +00:00
reinoud
1a9677836e Stub to pmap.c to avoid unhandled enumeration value error. Its only used
for printing purposes.

Will be modified later when UDF is finally committed after review.
Comitting has been put on halt due to dispute over a patch.
2005-12-15 01:53:30 +00:00
wiz
2f70583592 Remove unhandled H option from getopt() argument.
Describe -l in usage. Both from Igor Sobrado in private mail.

While here, sort options.
2005-12-13 10:02:04 +00:00
wiz
dbaaaf27a8 Sort options. 2005-12-12 22:49:37 +00:00
wiz
54282824e9 Sync usage with man page. 2005-12-12 22:42:34 +00:00
wiz
c64e5a3705 Improve -v description slightly. 2005-12-12 22:38:28 +00:00
dsl
0f4ad533d7 Add a -D option that acts like -d, but reads the filenames (whitespace
separated) from stdin.
Useful (eg in Makefile.kern.inc) to avoid breaking the systems command
line limit.
2005-12-12 22:05:28 +00:00
hubertf
aa2ac86c1f Fix old name in .Dt tag (CLCONFIG -> VNDCOMPRESS) 2005-12-12 21:04:31 +00:00
christos
74757293f7 add a trace facility for upcalls. 2005-12-11 19:29:27 +00:00
christos
4f17ba81bc Learn about v1 records and sa upcalls. 2005-12-11 11:31:34 +00:00
christos
14a515a88b learn about v1 records. 2005-12-11 11:30:06 +00:00
christos
e297758924 Learn about ktrace v1 records. 2005-12-11 11:29:06 +00:00
cube
4225631532 The loop detection code could not detect the negation of an instance that
made a device its own parent.  Add a test that checks that and stop looping
in that special case (after all, everything is already being handled by the
parent instance).

Reported by Jukka Salmi on current-user.
2005-12-10 13:39:47 +00:00
gavan
f1f29c8b8d Treat EOF the same as EIO. Prevents spinning if an EOF condition is
encountered, such as a USB serial device being unplugged.

Instead of spinning, the process reading from the serial line will exit,
leaving the process reading from the local terminal to exit when it notices
that its child has gone away.
2005-12-09 03:15:42 +00:00
wiz
559504cae5 lexi_co_graphical, with "co". From Igor Sobrado in PR 32231. 2005-12-04 09:14:58 +00:00
tsutsui
6413f86a09 Fix more FALLTHOUGH -> FALLTHROUGH typo. 2005-11-26 13:57:27 +00:00
christos
7cde8ec265 add new files. 2005-11-26 00:36:40 +00:00
he
b5d827cee2 Use of ``vflag'' should be protected by #ifndef SMALL. 2005-11-23 18:34:51 +00:00
mrg
426bb686c4 due to popular demand, don't warn about >4GB files not having their
size correctly stored.  PR#32105 among other requests.
2005-11-22 09:07:03 +00:00
mrg
e3969e9f13 apply a patch from onno van der linden in PR#32070 that fixes
these problems:
	1) gzip -vt just prints the contents of a .Z file
	2) gzip -vt will print OK even if the .gz file is corrupt
	3) gzip -vt prints nothing with a .bz2 file
	4) gzip can loop endlessly with a corrupt .bz2 file
2005-11-22 09:05:29 +00:00
rpaulo
e5a1f0391d Convert 3 printf() calls into one puts(). 2005-11-21 22:43:34 +00:00
ross
b4995580bb Fix old-style C code, update to WARNS=4.
Also, move file-scope .c extern decls to the .h file
2005-11-20 19:28:23 +00:00
jld
10e1da626c Style fixes and WARNS. 2005-11-18 22:16:49 +00:00
cube
7230395132 Invert the meaning of a comment to match reality. Pointed out by uwe@. 2005-11-13 17:24:31 +00:00
reed
9695cc3899 Add -false switch. From man page:
-false  This primary always evaluates to false.  This can be used follow-
        ing a primary that caused the expression to be true to make the
	expression to be false.  This can be useful after using a -fprint
	primary so it can continue to the next expression (using an -or
	operator, for example).

This was brought up on the tech-userlevel list in October.

Using -fprint on findutils or new NetBSD find(1) does not do what
I wanted. For example, if saving results of all files that start
with a vowel or saving results of all files owned by group operator,
then the list of files owned by group operator would not include
the files starting with a vowel.

findutils's find has a workaround for this with -false and also a
"," comma opeator. (I made add this comma operator later; you can use
the comma to perform multiple independent tests.)
2005-11-09 00:47:16 +00:00
wiz
5cc6a637b8 Prefer mdoc markup to roff. 2005-11-08 18:54:15 +00:00
wiz
07006c8815 Remove trailing whitespace. 2005-11-08 17:59:45 +00:00
erh
570d41f826 The swap*.o files actually do need to be specified on the individual kernel
build lines instead of in ${OBJS}.  Partially revert previous change.
2005-11-07 18:45:34 +00:00
erh
cd42936263 Remove special hack for swapnetbsd.c when generating the makefile.
Instead, just add it to the list of files.
Make "prefix foo" lines actually work right when foo is an absolute path,
 and make sure the length calculations correspond to the output.
Provide a way to specify a file that will always be included, and a way
 to omit the prologue ("$S/") on that file.
2005-11-07 03:26:20 +00:00
snj
5a7eec5112 Add NetBSD 2.1. 2005-11-06 20:14:36 +00:00
christos
4f38beeb43 Update documentation for pam, and don't accept flags that we don't support
anymore.
2005-11-01 15:47:43 +00:00
simonb
7dbaeb74a5 Sprinkle some KNF. 2005-10-27 01:43:48 +00:00
nonaka
0827467dac Don't forget original allocated memory address. 2005-10-22 15:32:48 +00:00
ross
2ea481dec5 Edit -s text. 2005-10-19 18:19:41 +00:00
elad
47ebf29d74 Revert, as requested by cube@. 2005-10-19 12:25:51 +00:00
elad
7f482dd3ce Strip trailing slashes before using the path.
PR/31869.
2005-10-19 12:17:22 +00:00
christos
64639a3896 Print symbolic signal names for killpg *sigaction* and *sigvec*. 2005-10-18 01:49:18 +00:00
aymeric
3b6dda9b52 the last revision introduced a bug in the handling of escape characters while
trying to correct a corner case. I will work on a final solution later.
Thanks to David Brownlee for noticing and notifying me.
2005-10-16 15:58:59 +00:00
wiz
34cace8bd1 Bump date for previous. 2005-10-12 20:10:45 +00:00
reed
4129c05469 This adds -fprint function. The primary name "-fprint" (but not the
code) comes from findutils; it behaves the same.

From my manpage addition:

 -fprint filename
	This primary always evaluates to true.  This creates filename or
	overwrites the file if it already exists.  The file is created at
	startup.  It writes the pathname of the current file to this
	file, followed by a newline character.  The file will be empty if
	no files are matched.

Here is an example usage:

find /etc \( -name "*pass*" -fprint file1 \) -o \( -group operator -fprint file2 \) -o -name "w*"

Note that this example will NOT include entry in file2 if it is
matched in first expression. (This also is same behaviour as
findutils, and I have implemented a -false primary to handle that.
I will commit it later.)

This creates the file as command line argument parsing time.
If there is an error somewhere on that line, such as missing values
or mismatched parenthesis, then a file may still be created.
(Even if a later -fprint filename is unwritable.) This is similar
behaviour to findutils. (It has been suggested that this find could
be code to create the files in an extra stage after the command-line
argument parsing and before the actual function processing.)

I will add -fprintx and -fprint0 soon.

This was discussed on tech-userlevel.
2005-10-12 20:03:59 +00:00
cube
437f8925a6 Introduce versioning to config(1). This will allow us to provide a way to
error out in a bit more friendly way when the user is trying to use
config(1) on a too old or too recent source tree.

To achieve that, introduce the "version NUMBER" statement which can be use
about anywhere in the config files.  Also, use two defines, CONFIG_VERSION
(which is the actual version of binary), and CONFIG_MINVERSION, which is
the minimum version the binary supports.

Allowing a range of versions serves several purposes:  first it allows me
to introduce the versioning without requiring it to be used right away in
the kernel tree, which means it will be possible to introduce new features
of config(1) rather progressively in the future.  E.g., using 'no pci' in
a config file could only require the new version in that config file, so
that the rest remains compatible.

In the end, an actual bump of the main config system (i.e., in conf/files)
will only be required when e.g., ioconf.c semantics change.

(Mostly-)silently accepted on tech-kern.  Error messages turned into
correct and meaningful English thanks to Tracy and Perry.
2005-10-12 01:17:43 +00:00
kleink
7031652201 Exit with 2 on usage errors as documented. Noted by Christian Biere in
PR bin/21933.
2005-10-10 22:13:20 +00:00
rpaulo
b17222de0e Mention uptime display. 2005-10-10 10:09:17 +00:00
christos
fbec9f21a4 - Exit with non-zero on errors (from Liam Foy)
- Pass lint.
2005-10-09 18:23:52 +00:00
aymeric
e6da8880e8 bump for latest changes:
. reintroduce ^V as a valid quoting character
. don't swallow quoting characters which are not followed by anything
2005-10-08 13:02:32 +00:00
aymeric
ca7788ba21 accept ^V again as a quoting character. At least one person uses it. (hi abs!)
While there, fix a bug that would swallow a quoting character if it were the
last one.
2005-10-08 12:41:48 +00:00
aymeric
7107bc131e remove the hack that changed backslaches to ^V's when the command is "set" (!).
Now backslashes are understood by argv_exp3().
2005-10-08 12:38:45 +00:00
kleink
a050a27360 Downgrade failure to kill(2) (other than ESRCH) from fatal error to a
warning; otherwise processing aborts and possibly matching killees would
remain unsignalled.  This makes pkill match the Solaris behavior.
2005-10-08 12:05:55 +00:00
drochner
de89d2ef8d s|expr|eval|g, to make the test portable 2005-10-06 17:38:09 +00:00
drochner
a908ca7d51 merge in FreeBSD's rev.1.14:
Fix m4 to properly handle bitwise operators &, ^, and |. Fix operator
precedence. Add short-circuit evaluation.
2005-10-06 17:28:33 +00:00
drochner
04e008c8e1 import a test for arithmetic expressions from FreeBSD 2005-10-06 17:23:23 +00:00
christos
c2bd98ebb5 From Liam Foy:
- Check for errno being set to ENOTDIR from execvp. This
  will stop an incorrect value being returned if a component
  of the new process image file's path is not a directory.
- Cleanup and KNF
2005-10-05 21:20:46 +00:00
hubertf
8457054037 Make it clear where this program can be found.
Requested by wiz.
2005-10-05 17:38:49 +00:00
hubertf
e533c36a54 Add locate.updatedb(8).
Discovered missing while sorting things out for BSDcertification.org.
Ran through wizd(8).
2005-10-05 06:29:03 +00:00
cube
b7505c1571 Stop walking the tree when two conditions are met: we've seen the device
already (one of its instances has been changed), and we have made no change
on any of the instances.

Previously, it stopped as soon as it detected the device had been seen.
While all the instances of the device at stake were eventually seen, the
same wasn't true for its children...

Fixes hpcmips's GENERIC.
2005-10-04 23:00:34 +00:00
cube
a31ff6b408 - Make sure to try aliases of removed device instances when walking
deaddevitab.
- Record the position in the config file of device instances so it is
  possible to tell if a device instance was declared before or after its
  parent's removal.

  E.g.:

     child* at parent?
     no parent

   will have the child instance ignored as an explicit orphan, while

     no parent
     child* at parent?

   will error out because now the child instance is a real orphan.

  That let the POSTPONED_ORPHAN regression test pass.
2005-10-04 20:13:39 +00:00
cube
9ea755eb2f Remove extra new line. 2005-10-04 13:33:20 +00:00
cube
5ec393e9ef Add a flag to mark broken instances. That might happen when there is a
syntax error in the file, yet we want to somehow gracefully go on in order
to print out all the errors in the file, which means we have to take
special care with those structures.

Reported by Simon Burge in private mail.
2005-10-04 13:06:45 +00:00
cube
0dbd1c0e04 - Keep track of the file in which we find the device instance
- Introduce xwarn() for delayed warnings
- Use xerror() and xwarn() in fixdevis() to notify about orphans

That way the correct file is printed when listing orphaned devices.

Reported by Juergen Hannken-Illjes in private mail.
2005-10-04 12:35:00 +00:00
wiz
5219255abf getfsent(3) does not contain any information about the (nonexisting)
function getfstype(), so don't MLINK it. Remove getfstype from other
places that reference it too.

Noted by jmc@openbsd.
2005-10-03 14:56:32 +00:00
christos
180fd9f68f PR/31452: Zafer Aydogan: Show uptime in top display (written by Simon Burge) 2005-10-03 05:34:51 +00:00
cube
2fb411a123 Don't return immediately when detecting that a devbase has already been
seen:  aliases might have to be activated, too.  Fixes GENERIC of alpha
and amiga.
2005-10-02 21:22:56 +00:00
chs
9c47d944e4 optimize pool_caches similarly to how I optimized pools before:
split the single list of pool cache groups into three lists:
completely full, partially full, and completely empty.
use LIST instead of TAILQ where appropriate.
2005-10-02 17:29:31 +00:00
cube
895e5687a9 Allow 'maxusers' redefinition. 'maxusers 0' will cancel the existing
value and make config(1) use the machine-dependent default.
2005-10-02 00:18:09 +00:00
cube
7aa6070d4e o Keep track of negated devices in deaddevitab
o  Rework do_kill_orphans() to use that information and mark explicitely
   orphaned devices (i.e., the ones whose missing ancestor has been
   negated)
o  Make a distinction between erroneous orphans and explicit orphans.
   Error out on the former, ignore the later (but print a warning when -v
   is used)

Yes, now config(1) will actually stop if you comment out a parent.  That
should help people still hoping adjustkernel is relevant these days :)
2005-10-01 23:30:37 +00:00
christos
c05266af8a fix setmode error handling. 2005-10-01 20:23:54 +00:00
he
92c0ed8788 The nusers variable is actually a size_t, so print with %zd, not %d. 2005-10-01 13:33:21 +00:00
wiz
57f7dd924d Sort option descriptions. Use more macros. New sentence, new line.
Add missing .El.
2005-10-01 00:03:47 +00:00
cube
7b7c582a4f Introduce two new statements:
no device at <attachment>

     <attachment> can take two forms:  either numbered/wildcarded, in which
     case only exactly matching instances will be removed, or plain (with
     no number or wildcard), in which case all matching instances will be
     removed.

     When <attachment> is a plain interface attribute, all instances using
     that attribute (either directly or through an explicit device) will be
     removed.

     E.g.:
             auich* at pci? dev ? function ?
             audio0 at audiobus?
             audio1 at auich?
             audio* at auich0

             no device at auich0     -> removes audio*
             no device at auich?     -> removes audio1
             no device at auich      -> removes audio1 _and_ audio*
             no device at audiobus?  -> removes audio0
             no device at audiobus   -> removes audio0, audio1 and audio*

  no <device>

     As in the previous case, <device> can either be numbered/starred, in
     which case all exactly matching instances are removed, or plain, in
     which case all instances of the device are removed.

    E.g.: (continuing previous example)

             no audio* -> removes 'audio* at auich0'
             no audio  -> removes all audio instances
2005-09-30 22:51:46 +00:00
cube
c130d400ba Rework the way orphan device instances are handled. To achieve that, keep
track of instances attaching at root, and walk down the tree of active
device instances.  Then, all instances that are not marked active are
found as orphans.

Doing it that way allows us to simply ignore orphan devices, instead of
warning about them and still keep them in the configuration.  Now, orphaned
instances are considered as never having existed.

In the end, this allows 'no <device> at <attachment>' to be much more
efficient, as the user doesn't have to negate all descendents of the
instance s/he actually wants to negate.  Warnings are still emitted,
though.

While there, make official a side-effect of the previous lack of action
against orphaned instances:  config(1) used to warn about instances that
attach at a numbered device when no instance of that device with that
number existed, even though there was a starred instance of the device.

E.g. (provided by Alan Barrett):

    pciide* at pci? dev ? function ? flags 0x0000
    wdc0    at isa? port 0x1f0 irq 14 flags 0x00
    wdc1    at isa? port 0x170 irq 15 flags 0x00
    atabus* at ata?
    wd0     at atabus0 drive 0

With this commit, config(1) will no longer warn about 'wd0 at atabus0'.
2005-09-30 22:36:20 +00:00
christos
ae3dca21e8 Patches from Liam Foy to:
- Use realloc instead of allocating 1000 structures.
- Remove NUSERS nonsense. If this is kept, shouldn't
  who(1) comply with it too?
- Be consistent with who(1). Add two identical options
  from who(1). These are -q and -H.
- General Cleans:
	- Move globals into local scope
	- Re-write a macro to remove an uneccessary
	  variable.
	- Use UT_NAMESIZE.
	- Remove unecessary header etc.

And from me, KNF, pass lint.
2005-09-30 17:58:24 +00:00
wiz
179b01d905 Fix typo reported by David A. Holland in PR 31422. 2005-09-30 13:46:56 +00:00
rpaulo
b04eff3537 ANSIfy. de-P(). Syle nits. 2005-09-25 18:56:33 +00:00
rpaulo
ff2bab1c59 tcp_callrpc(): bring in the FreeBSD version of this call. It uses the
"new" rpc functions and works with IPv6.
2005-09-25 18:50:28 +00:00
elad
851adad0b8 Use crypto/rmd160.h. 2005-09-25 14:34:54 +00:00
elad
a375b7cdb7 Use crypto/rmd160.h. 2005-09-24 22:40:32 +00:00
christos
c4445bc71c rename osockaddr to talkd_sockaddr and use that instead. 2005-09-24 16:40:01 +00:00
perry
cb4a630e29 in several comments:
implizit -> implicit
  explizit -> explicit
2005-09-24 15:30:35 +00:00
christos
c9f5645213 use getgrnam_r; from Jon Nemeth 2005-09-21 12:24:11 +00:00
he
c8a9612d27 Initialize pw to placate -Wuninitialized for sh3. 2005-09-20 15:48:17 +00:00
mrg
1a05f328bc apply a patch from christian biere:
- if we have an open fd, use it instead and, eg, fstat(2), of the file name
and stat(2).
- signed/unsigned variable fixes
- misc. cleanup
2005-09-20 05:12:15 +00:00
wiz
f38e8b27b1 Sync usage with man page. 2005-09-19 22:43:21 +00:00
elad
f36ecf9e54 Document -k and -p.
Noted by wiz@, perry@.
2005-09-19 15:12:09 +00:00
elad
f6deb21161 Add -k key and -p password.
Slightly modified diff from V. Hari.
PR/15736.
2005-09-18 21:50:20 +00:00
elad
c8399f93d6 Fix buffer overflow. We don't really care about trimming the filename here.
PR/28739, from Michael Santos.
2005-09-17 19:18:31 +00:00
chs
7bdb7511a0 fix build problems with parallel make: always descend into the tools dir
and add some .WAITs to avoid deciding to build a tool again before
the previous instance finishes.
2005-09-17 16:52:02 +00:00
mrg
84cb5f3013 oops. fix previous by keeping the stat() inside #ifndef SMALL. pointed
out by dsl.
2005-09-15 18:51:33 +00:00
mrg
bdc7967496 in file_compress() always stat() the input file. this patch avoids
reading from uninitialised space as provided by John Hein in PR#28995.
2005-09-15 09:30:21 +00:00
mrg
5c0ab9e0af fix signed/unsigned mismatch reported by Christian Biere in PR#31180
using his provided patch.
2005-09-15 09:11:30 +00:00
rpaulo
caaefabc19 Don't print a warning about stale utmp{,x} entries if security.curtain
sysctl is equal to 1. We can still detect stale utmp entries if that
knob is off.
2005-09-15 00:58:49 +00:00
drochner
360dbbc86f make bpf stats #ifndef SMALL,
fixes build of x_netstat
2005-09-14 15:35:26 +00:00
wiz
2f0ee62bbb According to rwhod(8), file names are actually /var/rwho/whod.* 2005-09-12 18:35:32 +00:00
christos
e64d9da627 Rewrite a macro in order to eliminate an unused global variable (Liam Foy) 2005-09-12 16:16:23 +00:00
wiz
aa81fc094a Use better section header. From YOMURA Masanori in private mail. 2005-09-11 23:30:20 +00:00
wiz
a56a69295c Remove unneeded macro default arguments. From YOMURA Masanori in private mail. 2005-09-11 23:29:44 +00:00
wiz
013b8f4ef7 Use .Nm instead of the verbose program name. From YOMURA Masanori in private mail. 2005-09-11 23:28:55 +00:00
wiz
17d58c1431 Argument is address_family, not "address family". From YOMURA Masanori in private mail. 2005-09-11 23:26:35 +00:00
wiz
2e504179eb Mark up authors with .An. From YOMURA Masanori in private mail. 2005-09-11 23:26:14 +00:00
wiz
30fa9d9a04 Mark up authors with .An. From YOMURA Masanori in private mail.
While here, replace Xrefs to itself with .Nm.
2005-09-11 23:25:32 +00:00
wiz
3c0c4bb078 Fix typos in file names. From YOMURA Masanori in private mail. 2005-09-11 23:23:56 +00:00
wiz
9a30a26518 We have spell again, xref it. From YOMURA Masanori in private mail. 2005-09-11 23:22:03 +00:00
wiz
b5e0c3219f Punctuation fix. From YOMURA Masanori in private mail. 2005-09-11 23:20:12 +00:00
wiz
ad44d18838 Argument is address_family, not "address family". From YOMURA Masanori in private mail. 2005-09-11 23:19:27 +00:00
wiz
60bf82edce Fix Xref. End sentence with a dot. From YOMURA Masanori in private mail. 2005-09-11 23:18:42 +00:00
wiz
c825c1ecf5 When marking up "C", use .Tn consisntently. From YOMURA Masanori in private mail. 2005-09-11 23:17:34 +00:00
wiz
2ae4fd55cf It is "home_dir:shell", not "home_dir_shell". From YOMURA Masanori in private mail. 2005-09-11 23:16:15 +00:00
wiz
01d8cf4ba8 Use more markup. From YOMURA Masanori in private mail.
While here: new sentence, new line; |fmt; s/.br/.Pp/
2005-09-11 23:15:20 +00:00
wiz
3025498c62 Use correct macro. From YOMURA Masanori in private mail. 2005-09-11 23:11:48 +00:00
wiz
775247d100 Punctuation nits. 2005-09-10 22:14:52 +00:00
jmmv
ec93365612 Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program.  This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*.  Therefore, it is disabled by
default in all kernels.  However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
2005-09-10 19:20:48 +00:00
martin
6fd5c01546 Move package/cinclude/include handling from the parser to the scanner,
where it belongs. This has the side effect of fixing PR toolchain/30903.
2005-09-10 15:38:46 +00:00
blymn
9e306bafdf Remove message when no tape drives found 2005-09-10 11:10:21 +00:00
rpaulo
d900564544 PR misc/31280: man 8 modstat is referencing itself. By Stefan Schumacher. 2005-09-09 22:47:26 +00:00