Commit Graph

8367 Commits

Author SHA1 Message Date
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