Commit Graph

3224 Commits

Author SHA1 Message Date
Crist J. Clark
0f56b10c4b Enlighten those who read the FINE POINTS of the documentation a bit
more on how ipfw(8) deals with tiny fragments. While we're at it, add
a quick log message to even let people know we dropped a packet. (Note
that the second FINE POINT is somewhat redundant given the first, but
since the code is there, leave the docs for it.)

MFC after:	1 day
2002-05-01 06:29:16 +00:00
Greg Lehey
1254a3ba7b Add partition type for IBM's JFS.
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-04-28 01:52:17 +00:00
Wes Peters
8373917257 Rename the file used to specify the nextboot to make it clear that this
is a loader configuration file and can be used for more than just a
kernel name.

Submitted by:	Gordon Tetlow <gordont@gnf.org>
2002-04-26 22:32:15 +00:00
Wes Peters
1de372dcd4 Add a -k option to reboot to specify the kernel to boot next time
around.  If the kernel boots successfully, the record of this kernel
is erased, it is intended to be a one-shot option for testing
kernels.

This could be improved by having the loader remove the record of
the next kernel to boot, it is currently removed in /etc/rc immediately
after disks are mounted r/w.

I'd like to MFC this before the 4.6 freeze unless there is violent
objection.

Reviewed by:	Several on IRC
MFC after:	4 days
2002-04-26 07:31:04 +00:00
Greg Lehey
942081a325 vinum_start: examine storage array devices, not just disks.
Submitted by:	Holger Kipp <holger.kipp@alogis.com>
PR:		37458
MFC after: 	5 days
		(to get 4.6 code freeze)
2002-04-26 04:21:59 +00:00
Poul-Henning Kamp
4ab9c1d126 Remove the -v option, it is now default behaviour.
Sponsored by:	DARPA & NAI Labs
2002-04-24 12:27:03 +00:00
Poul-Henning Kamp
9aba332745 Continue the cleanup preparations for UFS2 (& GEOM):
Use only one filedescriptor.  Open in R/O or R/W based in the '-N' option.
Make the filedescriptor a global variable instead of passing it around
as semi-global variable(s).

Remove the undocumented ability to specify type without '-T' option.

Replace fatal() with straight err(3)/errx(3).  Save calls to strerror()
where applicable.  Loose the progname variable.

Get the sense of the cpgflag test correct so we only issue warnings if
people specify cpg and can't get that.  It can be argued that this
should be an error.

Remove the check to see if the disk is mounted:  Open for writing
would fail if it were mounted.

Attempt to get the sectorsize and mediasize with the generic disk
ioctls, fall back to disklabel and /etc/disktab as we can.

Notice that on-disk labels still take precedence over /etc/disktab,
this is probably wrong, but not as wrong as the entire concept of
/etc/disktab is.

Sponsored by:   DARPA & NAI Labs.
2002-04-24 11:44:02 +00:00
Maxime Henrion
da85c82b2a Unbreak NFS mounts when mount(8) is invoked as : mount path@server.
Reviewed by:	obrien
2002-04-23 17:24:02 +00:00
Maxime Henrion
003dbca6a6 Do our best to determine if the user is attempting an NFS mount when
the filesystem type isn't given in the command line.  In the case of
an IPv6 address containing ':', one must use the '@' separator for it
to be properly parsed (mount_nfs(8) still needs fixing at the moment
though).

PR:		bin/37230
Reviewed by:	obrien
MFC after:	1 week
2002-04-22 23:03:03 +00:00
Dag-Erling Smørgrav
d397408818 Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
David Malone
b6925fa918 Add mount_udf and mount_smbfs to crossrefs.
PR:		37200
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
2002-04-21 18:23:58 +00:00
Philippe Charnier
4b8b67343c Add FBSDID. Start errx(3) messages with lowercase. Remove a ')' with no '('.
In usage(), use fprintf(3) instead of errx(3), to make the printed string really
start with `usage: ...'.
Reviewed by:	 marcel
2002-04-21 07:18:16 +00:00
Philippe Charnier
874506698f Use `The .Nm utility' 2002-04-20 11:58:12 +00:00
Boris Popov
5f3d1ad8c9 Add character translation table between Unix and NetWare according
to Sweden standards.

Submitted by:	Roger Olofsson <roger.olofsson@kommun.engelholm.se>
MFC after:	1 week
2002-04-20 05:35:02 +00:00
Philippe Charnier
92b425d0bd Use `The .Nm utility' 2002-04-19 23:06:29 +00:00
Poul-Henning Kamp
dce9aaab45 Push the .info file contents out when we're done so people can
read the description while the megs shift from one place to another.
2002-04-19 09:38:45 +00:00
SUZUKI Shinsuke
88ff5695c1 just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.
(based on freebsd4-snap-20020128)

Reviewed by:	ume
MFC after:	1 week
2002-04-19 04:46:24 +00:00
Warner Losh
bc123897ed De-__P, use ansi function definitions 2002-04-18 17:14:09 +00:00
Tom Rhodes
05a213f1e8 Fix the fdisk(8) manual page.
s/partition/slice/ in fdisk.8
fix a bug in fdisk(8) where it did not honer -t when using -I

PR:		36563 and 35688
Submitted by:	bde
Reviewed by:	bde
2002-04-18 16:25:18 +00:00
Ruslan Ermilov
71b3ac84e1 Replaced exists() tests with two equivalent defined().
LIBDIR is defined in bsd.own.mk but sys.mk no longer
includes bsd.own.mk as of revision 1.60.
2002-04-18 07:01:35 +00:00
Tom Rhodes
7ac806655e dump(8)'s manual page is confusing in its use of records, blocks,
blocksizes, etc
does not give the default of -b
only mentiones rdump in the NAME section
uses both filesystem and file system in similar contexts

PR:		34248
Submitted by:	Gary W. Swearingen <swear@blarg.net>
MFC after:	3 days
2002-04-17 02:10:33 +00:00
Giorgos Keramidas
6002cc3e6f Expand the reserved space section. Explain how the amount of reserved
space can affect performance.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
2002-04-16 05:35:56 +00:00
Jun Kuriyama
a9f14ef33f Change reference URLs.
Submitted by:	Olivier Tharan <olivier.tharan@idealx.com>
PR:		docs/37094
MFC after:	1 week
2002-04-16 01:18:25 +00:00
Tom Rhodes
2c80d96e99 disklabel(8) manual page:
--change "-s newboot" to "-s newboot2" in an example
--Fixed spelling
--Fixed some confusion between slice/parition/primary partition and other
things.

PR:		35947 and 35951
Noticed by:	Gary W. Swearingen <swear@blarg.net>
Reviewed by:	keramida
Thanks to:	grog
MFC after:	2 days
2002-04-15 22:24:34 +00:00
Jeroen Ruigrok van der Werven
7d4eb6135b Sync with UDF p4 tree: Properly initialize part of the mntopts.
Move to WARNS=1.
2002-04-15 20:16:48 +00:00
Poul-Henning Kamp
b35c8f287d Take the "tickadj" element out of struct clockinfo. Our adjtime(2)
implementation is being changed and the very concept of tickadj will
no longer be meaningful.
2002-04-15 12:11:06 +00:00
Scott Long
51a7b740a1 Actually add the UDF files! 2002-04-14 16:52:14 +00:00
Scott Long
df263cbd02 Add a filesystem driver for the Universal Disk Format. For more info,
see http://people.freebsd.org/~scottl/udf

 MFC after:	when asmodai gets the backport done
 Prodded by:	phk asmodai des
2002-04-14 16:36:49 +00:00
David E. O'Brien
c3fa6e4e46 Do not use perl where sed is more than adequate. 2002-04-13 23:53:36 +00:00
Marcel Moolenaar
5da217f64c High-level changes (user visible):
o  Implement -c (clear) to clear previously kept headers (note that
   dumps not cleared will remain until -c is used),
o  Implement -f (force) to allow re-saving a previously saved dump,
o  Implement -k (keep) and make clearing the dump header the default,
o  Implement -v (verbose) and make most output conditional upon it,
o  Emit minimal output for the non-verbose case with the assumption
   that savecore is run mostly from within /etc/rc,
o  Update usage message to reflect what is and what's not,
o  mark -d as obsolete.

Low-level changes:
o  Rename devname to device, for devname mirrors a global declaration
   and GCC 3.x warns about it,
o  Open the dump device R/W for clear and !keep to work,
o  Reorder the locals of DoFile according to style(9),
o  Remove newlines from strings passed to warn* and err*,
o  Use stat(2) to check if a dump has been saved before,
o  Truncate existing core and info files to support force,
o  First check for the magic and the version before we complain about
   parity errors. This prevents emitting parity error messages when
   there's no dump,
o  Keep track of the number of headers found and the number of headers
   saved to support the minimal output,
o  Close files we opened in DoFile. Not critical, but cleaner.
2002-04-13 08:20:15 +00:00
Ruslan Ermilov
99150dfb78 I don't know what the MAINTAINER means in src/ part of FreeBSD.
I'll still be overseeing the changes that go into natd(8) and
will maintain it the way I see it, non-preventing for the rest
of developers.

I will re-ask for the MAINTAINER bit if the ${MAINTAINER} gets
defined.
2002-04-12 19:11:09 +00:00
Tom Rhodes
9532eef22c restore(8) manual page does not explain rrestore.
PR:		34234
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-04-12 18:31:09 +00:00
Ruslan Ermilov
df422a1217 Removed the cruft that became cruft after rev. 1.4.
Fixed CLEANFILES.
2002-04-12 11:12:37 +00:00
Tom Rhodes
0042d709b8 Update dumpon manual page to explain single/multi-user usability
PR:	36465
No Objections from:	ru
2002-04-09 19:51:50 +00:00
Poul-Henning Kamp
158f391356 GC kget(1), userconfig is long dead. 2002-04-09 10:55:14 +00:00
Poul-Henning Kamp
7f086a0852 Rename DIOCGKERNELDUMP to DIOCSKERNELDUMP as it strictly speaking
is a "set" not a "get" operation.

Sponsored by:	DARPA & NAI Labs.
2002-04-09 10:04:09 +00:00
Poul-Henning Kamp
2dd527b3ac Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.
Sponsored by:	DARPA & NAI Labs
2002-04-08 09:20:07 +00:00
Poul-Henning Kamp
5f76b095ad Don't set WARNS to 2, we're default compatible now.
Noticed by:		bde
2002-04-08 06:26:46 +00:00
Jeroen Ruigrok van der Werven
59501efcbd Add the possibility to use a no_rip_out configuration option in order
to stop routed from sending out RIP updates.

PR:		29090
Submitted by:	Matthew Braithwaite <mab@red-bean.com>
2002-04-07 17:01:20 +00:00
Poul-Henning Kamp
ebdb43a2f8 bbsize and sbsize cannot ever be trusted from the disklabel, in
particular as there may not be one.  Remove #if 0'ed code which might
mislead people to think otherwise.

unifdef -ULOSTDIR, fsck can make lost+found on the fly.

Sponsored by:	DARPA & NAI Labs
2002-04-07 14:57:57 +00:00
Maxime Henrion
c31e07fb1a Add code to try the nmount(2) syscall when mount(2) failed with
EOPNOTSUPP.  This will make things less painful when I will commit
the conversion of devfs, fdescfs and pseudofs to nmount.

Reviewed by:	phk
2002-04-07 13:28:18 +00:00
Poul-Henning Kamp
6b0ff5f596 Get us to WARNS=2 with a bit of constification and some printf fiddling.
Pick up the c-partitions magicness from sys/disklabel.h instead
of defining our own magicness for it, remove trivial comment.

Sponsored by: DARPA and NAI Labs.
2002-04-07 10:57:00 +00:00
Poul-Henning Kamp
24ba60e3a7 Nuke a totally pointless optional debug option
Sponsored by: DARPA and NAI Labs.
2002-04-07 10:39:23 +00:00
Kirk McKusick
cdd5d266b2 When checking the alternate superblock, we used to copy any fields
that might have changed, then did a byte-by-byte comparison with
the alternate. If any unused fields got used, they had to be added
to the exception list. Such changes caused too many false alarms.
So, I have changed the comparison algorithm to compare a selected
set of fields that are not expected to change. This new algorithm
causes far fewer false hits and still does a good job of detecting
problems when they have really occurred. In particular, this change
should ease the transition to kernels supporting UFS2 which make
some significant changes to the superblock.

Sponsored by:	DARPA, NAI Labs
2002-04-07 05:16:33 +00:00
Søren Schmidt
2f1eaa933e Sync with the new endianness in ata.h 2002-04-05 21:51:03 +00:00
Søren Schmidt
99bb242b53 Be able to print ATA133 mode. 2002-04-05 11:49:24 +00:00
Poul-Henning Kamp
4805ff9a48 Remove remaining traces of d_boot[01] 2002-04-04 20:22:15 +00:00
Bruce Evans
73c36e3672 Fixed some style bugs in axings. Whitespace before __P was not axed when
__P was axed.  The ordering of several things was bogotified by axing
ifdefs.
2002-04-04 09:56:51 +00:00
Bruce Evans
a2f4e30c8c Fixed some English errors in previous commit.
Fixed some style bugs in the removal of __P(()).  Whitespace before
"__P((" was not removed.
2002-04-04 09:45:11 +00:00
Poul-Henning Kamp
1f35193bdc Add more DWIM/autoadjustment and less evil style(9) banned exit(2) codes.
Add some missing statics.

Sponsored by: DARPA & NAI Labs.
2002-04-03 20:48:05 +00:00
Poul-Henning Kamp
fa8d75e0a1 Unifdef -DCOMPAT 2002-04-03 19:53:09 +00:00
Poul-Henning Kamp
95f6bf5d54 Kill only usage of the undocumnted and unuse d_boot[01] fields of
struct disklabel.

Sponsored by:	DARPA & NAI Labs.
2002-04-03 15:46:56 +00:00
Marcel Moolenaar
5cb87b0c59 Make the kernel dump header endianness invariant by always dumping
in dump byte order (=network byte order). Swap blocksize and dumptime
to avoid extraneous padding on 64-bit architectures. Use CTASSERT
instead of runtime checks to make sure the header is 512 bytes large.
Various style(9) fixes.

Reviewed by: phk, bde, mike
2002-04-03 07:24:12 +00:00
Søren Schmidt
3348c0092c Add get-status to the ATA RAID subsystem. 2002-04-02 13:48:17 +00:00
Marcel Moolenaar
da64ea48d2 Move savecore back to the MI list so that it compiles for other
archs than alpha and i386.
2002-04-02 10:58:30 +00:00
Maxim Konovalov
c6facae4d9 WARNS fixes.
Submitted by:	kris
Reviewed by:	bde
Approved by:	ru
MFC after:	2 weeks
2002-04-02 10:15:32 +00:00
Maxim Konovalov
1ad0b1beb4 style(9) cleanup.
Submitted by:	kris (an early version of this patch)
Reviewed by:	bde
Approved by:	ru
MFC after:	2 weeks
2002-04-02 09:36:46 +00:00
John Baldwin
3837db64a7 Add long long casts so that this compiles on archs with 64-bit longs.
Pointy-hat to:	phk
2002-04-01 18:23:58 +00:00
Poul-Henning Kamp
d94f51a007 Duh, savecore is called savecore. 2002-04-01 08:27:19 +00:00
Kenneth D. Merry
515f06ebc0 Fix a bzero length calculation. sizeof(struct ccb_getdev) should have been
sizeof(struct ccb_getdevstats).

MFC after:	3 days
2002-04-01 03:58:51 +00:00
Poul-Henning Kamp
d503fad022 Savecore:
Commandline compatible with the previous savecore unless you specify
any options, none of them are implemented (yet).

Scans all devices marked "dump" or "swap" for dump header signatures
and saves dumps off under a name which is a MD5 hash of the header
information.  This should give unique filenames.  A *.info file contains
ascii version of the header information.
2002-03-31 22:26:56 +00:00
Poul-Henning Kamp
9e9c1cad4c Here follows the new kernel dumping infrastructure.
Caveats:

The new savecore program is not complete in the sense that it emulates
enough of the old savecores features to do the job, but implements none
of the options yet.

I would appreciate if a userland hacker could help me out getting savecore
to do what we want it to do from a users point of view, compression,
email-notification, space reservation etc etc.  (send me email if
you are interested).

Currently, savecore will scan all devices marked as "swap" or "dump" in
/etc/fstab _or_ any devices specified on the command-line.

All architectures but i386 lack an implementation of dumpsys(), but
looking at the i386 version it should be trivial for anybody familiar
with the platform(s) to provide this function.

Documentation is quite sparse at this time, more to come.

Sponsored by:   DARPA, NAI Labs

Details:

Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set it
to be the dumpdevice.  When "off" is set, /dev/null is used.
2002-03-31 22:24:24 +00:00
Søren Schmidt
4486f609fc Add support for getting status (fan, temp, 5V and 12V levels) from
Promise Superswap enclosures.

Sponsored by: Advanis
2002-03-30 16:36:41 +00:00
Poul-Henning Kamp
041b8b0058 Get this to WARNS=4 and closer to style(9) at a sacrifice in
linelength.
2002-03-29 19:33:14 +00:00
Ruslan Ermilov
1876df83f4 Turn "ether" address family into a generic "link" family
that could be used to set/get arbitrary length link level
addresses.  Alias "lladdr" parameter and "ether" family
to the new "link" family for backward compatibility.

PR:		bin/31476
MFC after:	1 week
2002-03-27 14:29:23 +00:00
Søren Schmidt
f642c834f4 Add support for creating/deleting ATA RAID's
Sponsored by: Advanis
2002-03-27 10:59:53 +00:00
Warner Losh
5416b6f4dd Add missing \ before an 'n' to get the proper newline when running
fdisk -s for each partition.
2002-03-27 06:20:20 +00:00
Pierre Beyssac
85554bf8ff Fix problem in macro definition breaking compiles with -DDEBUG.
PR:		bin/35773
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
2002-03-26 17:37:59 +00:00
Darren Reed
730c9b8cfb add extra include path to get .h files from source being used to compile 2002-03-26 10:09:09 +00:00
Pierre Beyssac
bc6d68df97 Add forgotten flag in flag lists.
PR:		docs/36267	(partial)
Submitted by:	Thomas Quinot <thomas.cuivre.fr.eu.org>
2002-03-25 10:45:28 +00:00
Mark Murray
8e2e167cdd Replace __progname with the documented, more acceptable and functionally identical getprogname(3). 2002-03-24 15:17:53 +00:00
Mark Murray
b813a7142b Replace __progname with the functionally identical but more
acceptable (documented) getprogname(3).
2002-03-24 15:06:48 +00:00
Pierre Beyssac
038148d678 Add option -n to i386 boot2 to disallow boot interruption by keypress.
PR:		i386/36016
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
Reviewed by:	rnordier
MFC after:	1 week
2002-03-23 19:40:27 +00:00
David E. O'Brien
efc8588d57 Style(9) local vars after 'register' removal.
Requested by:	bde
2002-03-23 18:10:59 +00:00
Warner Losh
d476a036e2 o remove __P
o remove main prototype
2002-03-21 13:20:49 +00:00
Warner Losh
854299908c o __P removed
o main prototype removed
2002-03-21 13:14:21 +00:00
Warner Losh
0638cc1a39 o __P removal.
o ansi function definitions.
o main prototype removal
o unifdef __STDC__
2002-03-21 13:10:52 +00:00
Mike Barcroft
40dcc8608d Revert 1.20:
Memory disks may be used for other purposes besides newfs(8), so it
isn't helpful to require the minimum size meet newfs(8)'s criteria.
2002-03-21 12:03:09 +00:00
Ruslan Ermilov
7a43a96ab0 Replaced hacks in sbin/Makefile,v 1.99 and usr.sbin/Makefile,v 1.217
with the NO_IPFILTER make.conf(5) knob.

(So that we can "make the-rest-of-the-world" again.)
2002-03-21 09:15:39 +00:00
Mike Barcroft
6a1bd01754 Provide a proper error message in mdconfig(8) when a filesystem is too
small, instead of a less meaningful error in newfs(8).
2002-03-21 07:46:09 +00:00
Warner Losh
b70cd7ee68 o __P removed
o ansi function prototypes
o unifdef -D__STDC__
o __dead2 on usage prototype
o remove now-bogus main prototype
2002-03-20 22:57:10 +00:00
Warner Losh
73bf18edb8 o remove __P
o Use ansi function definitions
o unifdef -D__STDC__
2002-03-20 22:53:13 +00:00
Warner Losh
2db673ab00 o remove __P
o Use ANSI function definitions
o unifdef -D__STDC__
2002-03-20 22:49:40 +00:00
David E. O'Brien
3d438ad61f Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
 "register" -- just how many free registers do people think machines have?)
2002-03-20 17:55:10 +00:00
Darren Reed
266ef5ec2d * add extra -I path to get the "matching" header files. (and split the one
line up into three to make it more readable)
2002-03-20 09:04:34 +00:00
Darren Reed
1bdb47d692 * add extra -I path to get the "matching" header files. 2002-03-20 09:02:48 +00:00
Darren Reed
b62a26b14e * need to compile printnat.c now that this function is in a separate .c file
* add extra -I path to get the "matching" header files.
2002-03-20 09:01:48 +00:00
Poul-Henning Kamp
5dccd5c649 Swing the axe and remove some archaic features from newfs which modern
diskdrives do neither need nor want:

	-O create a 4.3BSD format filesystem
	-d rotational delay between contiguous blocks
	-k sector 0 skew, per track
	-l hardware sector interleave
	-n number of distinguished rotational positions
	-p spare sectors per track
	-r revolutions/minute
	-t tracks/cylinder
	-x spare sectors per cylinder

No change in the produced filesystem image unless one or more of
these options were used.

Approved by:	mckusick
2002-03-20 07:16:15 +00:00
Warner Losh
582236c5b2 Kill register 2002-03-20 04:33:25 +00:00
Robert Watson
ec3b06a0fe "-" now sends output to stdout. 2002-03-20 02:35:14 +00:00
Robert Watson
b819704f1b Teach growfs's dbg_open() that a filename of "-" for output means to
open "/dev/stdout".  This doesn't actually affect growfs, but does affect
ffsinfo, permitting ffsinfo to output to the shell's stdout rather than
requiring it be dumped to a file or explicitly pointed at a special
device.

Reviewed by:	peter
2002-03-20 02:34:01 +00:00
David E. O'Brien
5461a012fd Remove ipnat until the committer can actually test his changes. 2002-03-20 02:09:50 +00:00
Alfred Perlstein
63e99e978a Hopefully fix make world.
Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
2002-03-19 22:51:53 +00:00
Poul-Henning Kamp
89fb8ee796 Add the undocumented -R option to disable randomness for regression-testing.
Add a couple of simple regression tests accessible with "make test", they
depend on the md(4) driver.

FYI I have also tried running the test against a week old newfs and it
passed.
2002-03-19 21:05:29 +00:00
Poul-Henning Kamp
8409849dd0 Further cleanups. 2002-03-19 20:01:38 +00:00
Warner Losh
c1fdb43f59 Remove stray register 2002-03-19 18:47:50 +00:00
Warner Losh
34ef9eb5e6 De-__P the man page, but I suspect that we need to freshly import
sys/disklabel.h since the one in here looks a little crunchy.
2002-03-19 18:44:56 +00:00
Ian Dowse
475df34ac2 Replace a number of similar for' loops with a new ilog2()' function
that computes the base-2 log of a power of 2.
2002-03-19 17:39:01 +00:00
Ian Dowse
bf57cced53 Complete the ANSIfication of newfs by converting function declarations
to C89 style.
2002-03-19 17:20:02 +00:00
Ian Dowse
f7b48c89c8 The FSIRAND code is always compiled in, and it is unlikely that
anyone needs a newfs without it. Remove the #ifdef's from around
the code and the -DFSIRAND from the Makefile. Also remove redundant
declarations of random() and srandomdev().
2002-03-19 17:03:14 +00:00
Ian Dowse
9710700cb1 Remove the ancient STANDALONE code.
Approved by:	phk
2002-03-19 16:47:20 +00:00
Darren Reed
a2a5557d65 both ipnat and ipfstat now use libkvm rather than their own home-rolled
kmem accessors, allowing them to be used with crash dumps as well as live
systems, now.
2002-03-19 15:07:30 +00:00
Warner Losh
1fa5ae8f93 o Remove __P
o Use ANSI function definitions
o mark usage() as __dead2
2002-03-19 13:29:39 +00:00
Peter Wemm
dbfec43cd3 Move savecore build enable to MD section of Makefile, currently enabled
for i386 and alpha.  Although it builds on sparc64, it does not yet work.
A similar hack as what is used on the sparc64 MD macros can be used to
make ia64 build too, but there doesn't seem to be much point.
2002-03-19 12:07:27 +00:00
Ian Dowse
af53d6d86e Remove yet more vestiges of mount_mfs. 2002-03-18 15:31:44 +00:00
Warner Losh
d1a939c146 o __P
o Strict ANSI declarations.
o return (foo);
o main (int, char *[])
2002-03-18 06:59:15 +00:00
Warner Losh
326c7cdab5 o remove __P
o Use ANSI function definitions
o const poison
o remove register
2002-03-18 06:17:50 +00:00
Warner Losh
e5fa3ee654 o __P removal.
o Use ANSI function definitions.
o main(int, char *[])
2002-03-18 05:00:52 +00:00
Warner Losh
323e7ff82e o Use real prototypes and ANSI function definitions.
o Remove __P.
2002-03-18 04:57:08 +00:00
Warner Losh
bbbc97356c o Use real prototypes
o Remove __P.
o main(int, char *[])
2002-03-18 04:55:09 +00:00
Bruce Evans
0c08079e26 Fixed some style bugs (mainly ones not fixed or made worse by rev.1.44).
Don't use ISO string concatentation to obfuscate long single-line
messages...
2002-03-18 03:04:58 +00:00
Bruce Evans
63dab85cea Fixed some style bugs (mainly ones not fixed or made worse by rev.1.41).
Old code obfuscates long (but single-line) messages by printing them in
pieces using %s.  Rev.1.41 obfuscated some new long messages using ISO
string concatenation.  This commit only fixes the new obfuscations.
2002-03-18 02:43:14 +00:00
Bruce Evans
3ac7f11229 Removed vestiges of mount_mfs. Sorted the Makefile a bit. 2002-03-18 02:23:43 +00:00
Bruce Evans
3f305db0a2 Fixed 2 layers of breakage of WARNS. Setting WARNS unconditionally to
0 was bad and setting it unconditionally to 2 was worse.
2002-03-18 02:13:38 +00:00
Poul-Henning Kamp
345b78a301 Remove __P() and register.
Set WARNS=2

This is the beginning of a pre-UFS2 cleanup of newfs.

Sponsored by:	DARPA, NAI Labs
2002-03-17 09:01:41 +00:00
Ruslan Ermilov
f303d23186 This sounds better. 2002-03-15 18:12:13 +00:00
Ruslan Ermilov
d1f8bca053 mdoc(7) police: tiny fixes. 2002-03-15 15:07:39 +00:00
Ruslan Ermilov
e629e744a2 mdoc(7) police: GC duplicate VCS ID. 2002-03-15 15:02:13 +00:00
Ruslan Ermilov
424616bb1c mdoc(7) police: misc fixes. 2002-03-15 14:56:53 +00:00
Ruslan Ermilov
86fbcc3207 mdoc(7) police: kill whitespace at eol. 2002-03-15 14:45:45 +00:00
Ruslan Ermilov
992b9b7a2a mdoc(7) police: tiny fixes. 2002-03-15 14:34:10 +00:00
Ruslan Ermilov
e3390c2a99 mdoc(7) police: tiny fixes. 2002-03-15 14:28:05 +00:00
Bill Fumerola
78d9ac5774 minor grammar fixes 2002-03-14 10:09:19 +00:00
Robert Nordier
8a1917d017 Clarify the cylinder > 1023 issue, now that EDD support is automatic.
Also drop a note about undocumented features that was intended to
cover the since-documented slice-selection syntax.
2002-03-13 19:00:19 +00:00
Ruslan Ermilov
cd6ab711b3 Document the "slice" syntax.
Prodded by:	ambrisko
2002-03-13 12:30:46 +00:00
Ruslan Ermilov
9662d32c73 Implement -m and -p loader(8) "boot" command options in boot2.
(This is more useful for 4.x where boot blocks can still load
kernels, modulo the PR kern/17422.)
2002-03-13 11:03:36 +00:00
Murray Stokely
64f24fd5b8 Add information about multi-session CDs from the log message of r1.4.
Also, add an examples section and show how to mount a Kodak Photo-CD.

PR:		docs/35206
2002-03-13 08:27:27 +00:00
Luigi Rizzo
617cc038bc Document the existence of machdep.guessed_bootdev, as suggested
by Sheldon.
For a detailed description look at the commit log for sysctl.c
rev.1.42 -- i do not think it is appropriate to put the full
description in this manpage, and the "boot" and "loader" manpages
where this description might go are also missing a description of
a number of similar variables, so i think this it is ok to limit
documentation to this now, and update it later when I (or someone
else) have a chance to revise "boot" and "loader".
2002-03-12 13:55:19 +00:00
Dag-Erling Smørgrav
66a79b3d49 Sparc64 support. 2002-03-11 11:23:48 +00:00
Luigi Rizzo
bca9bbeae7 Make the handling of machdep.guessed_bootdev compiled on i386 only. 2002-03-11 06:50:28 +00:00
David E. O'Brien
fd43aa1c2c Add complete Sparc64 support.
Submitted by:	tmm

Dike out vax support.
2002-03-11 04:41:42 +00:00
David E. O'Brien
90b8f6bab5 * Support the Sparc64.
* Do not default to any particular platform.  Require that we explicitly
  support a particular platform.
2002-03-11 04:20:37 +00:00
Dima Dorfman
c871474800 Chase sysctl name.
Submitted by:	Christopher Sharp <christopher_sharp@web.de>
2002-03-11 00:07:55 +00:00
Luigi Rizzo
60cf2c1254 Export a (machine dependent) kernel variable bootdev as
machdep.guessed_bootdev, and add code to sysctl to parse its value
and give a (not necessarily correct) name to the device we booted
from (the main motivation for this code is to use the info in the
PicoBSD boot scripts, and the impact on the kernel is minimal).

NOTE: the information available in bootdev is not always reliable,
so you should not trust it too much.  The parsing code is the same
as in boot2.c, and cannot cover all cases -- as it is, it seems to
work fine with floppies and IDE disks recognised by the BIOS. It
_should_ work as well with SCSI disks recognised by the BIOS.
Booting from a CDROM in floppy emulation will return /dev/fd0 (because
this is what the BIOS tells us).
Booting off the network (e.g. with etherboot) leaves bootdev unset so
the value will be printed as "invalid (0xffffffff)".

Finally, this feature might go away at some point, hopefully when we
have a more reliable way to get the same information.

MFC-after: 5 days
2002-03-10 20:08:44 +00:00
Søren Schmidt
c75ece6633 Check the <channel> arg a bit more.
Submitted by: David Malone <dwmalone@maths.tcd.ie>
2002-03-10 13:59:00 +00:00
Dima Dorfman
42277d473c Document `sysctl variable=/dev/foo' syntax.
PR:		34184
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
2002-03-10 09:53:39 +00:00
Dima Dorfman
1c1a8b560e Remove inappropriate .Op calls in examples.
PR:		35689
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-03-10 09:10:06 +00:00
Dima Dorfman
a697e022f0 Minor English fixes.
PR:		35730
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-03-10 08:50:53 +00:00
Søren Schmidt
de7997511b Update headers 2002-03-04 21:11:30 +00:00
Poul-Henning Kamp
5b4455186e A bit of premptive GEOM POLA magic: If we don't get a virgin disklabel
from /dev/food0, then try from /dev/f00d0c, in strange cases this work.
2002-03-03 21:21:45 +00:00
Søren Schmidt
0df4b5542c Add the RAID rebuild command. 2002-03-03 15:41:57 +00:00
Ian Dowse
9ac0768d74 Add a new "-S" flag to dump to allow it just print out dump estimate
size and then exit.

PR:		bin/35450
Submitted by:	Mark Hannon <markhannon@optushome.com.au>
Obtained from:	NetBSD
MFC after:	1 week
2002-03-01 20:54:23 +00:00
Hajimu UMEMOTO
4adb3cea54 Show standard deviation.
PR:		bin/35433
Submitted by:	Morten Rodal <morten@rodal.no>,
		Maxim Konovalov <maxim@macomnet.ru>
MFC after:	1 week
2002-03-01 09:49:48 +00:00
Makoto Matsushita
0ed8a30f62 Fix "make release.4" breakage.
src/contrib/isc-dhcp/includes/minires/resolv.h has a 'extern' definition
but it makes an error when linking crunched binary just like this:

	dhclient.lo: In function `MRres_nquery':
	dhclient.lo(.text+0x2dcce): undefined reference to `__h_errno_set'
	dhclient.lo(.text+0x2dd5b): undefined reference to `__h_errno_set'
	dhclient.lo: In function `MRres_nquerydomain':
	dhclient.lo(.text+0x2de53): undefined reference to `__h_errno_set'

The author understands this will be a problem (see comments in resolv.h).
Murray said that the author will fix this, but as a temporary solution,
modifying the source code and not to use __h_errno_set.

BTW, I'm sorry that previous commitlog in src/sbin/dhclient/Makefile should
read "Found by:" instead of "Confirmed by"; I just found that rev 1.15
has a typo so fixed.

Tested on: ushi.jp.FreeBSD.org with today's 5-current source code.
           (belive me, "make release.4" works fine now)
2002-02-28 16:17:18 +00:00
Brooks Davis
71c7d82d26 Some style(9) whitespace fixes and a correction to the copyright. 2002-02-28 01:03:27 +00:00
Makoto Matsushita
226e3b6ec6 For unbraking "make release": s/client/common/g
(these files are sitting in src/contrib/isc-dhcp/common, not .../client.)

Confirmed by: 5.0-CURRENT-20020228-JPSNAP at snapshots.jp.FreeBSD.org
2002-02-28 00:02:33 +00:00
Bill Fenner
5db89bc7e6 Use network byte order for the ICMP sequence number. This is only
significant when monitoring packets on another system, since
 otherwise the ICMP sequence number is only used by the ping client.
2002-02-27 22:37:22 +00:00
Dima Dorfman
76183f3453 Introduce a version field to `struct xucred' in place of one of the
spares (the size of the field was changed from u_short to u_int to
reflect what it really ends up being).  Accordingly, change users of
xucred to set and check this field as appropriate.  In the kernel,
this is being done inside the new cru2x() routine which takes a
`struct ucred' and fills out a `struct xucred' according to the
former.  This also has the pleasant sideaffect of removing some
duplicate code.

Reviewed by:	rwatson
2002-02-27 04:45:37 +00:00
Murray Stokely
d52ccfe321 Add some ifdef(RELEASE_CRUNCH) goo to explicitly list the requisite
object files for crunchgen.  Without this patch, release.4 will fail
to build the crunched binaries for the release floppies.
2002-02-26 15:12:54 +00:00
Bruce Evans
ce68584226 #include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for its prerequisite <sys/time.h>.

#include <sys/param.h> in the correct place instead of bogusly including
<sys/types.h>.
2002-02-25 03:36:06 +00:00
David E. O'Brien
d5c6e8dee0 Neutralize bits of ns_parse.c with bad juju. 2002-02-20 05:45:59 +00:00
David E. O'Brien
3c442e5104 Style cleanup.
Approved by:	Murray
2002-02-19 22:23:49 +00:00
Murray Stokely
0829ba2c77 Makefile glue for DHCP v3 import. 2002-02-19 12:57:18 +00:00
Mike Barcroft
fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Josef Karthauser
978d3bfe9c Add some more partition types.
PR:		i386/14793
MFC after:	3 days
2002-02-18 19:32:38 +00:00
Ian Dowse
ab3d6ee098 Use a more robust scheme for determining how many blocks to skip
after an EOT-terminated volume. We keep track of the current record
number, and synchronise it with the c_tapea field each time we read
a header. Avoid the use of c_firstrec because some bugs in dump can
cause it to be set incorrectly.

Move the initialisation of some variables to avoid compiler warnings.
2002-02-18 02:29:47 +00:00
Ian Dowse
dea08b6818 When we reach the end of the dump in findinode(), ask for another
volume if we missed some earlier tapes (the user can still enter
'none' later if the tapes are unavailable). Previously with 'x'
restores, we might not ask for all tapes if the tapes are supplied
in reverse order.

Clarify the message that describes what volume should be mounted
first; reverse order is only efficient when extracting a few files.
2002-02-18 00:54:18 +00:00
Ian Dowse
2bb823d2b9 Supply progress information in dump's process title, which is useful
for monitoring automated backups. This is based on a patch by Mikhail
Teterin, with some changes to make its operation clearer and to
update the proctitle more frequently.

PR:		bin/32138
2002-02-16 21:05:16 +00:00
Ian Dowse
19f8080e63 On receipt of a SIGINFO, schedule an immediate printout of the
percentage complete and remaining time estimate.

PR:		bin/32138
Submitted by:	mi
2002-02-16 20:22:26 +00:00
Luigi Rizzo
535862401b Do not disable IPv6 and vlan support when RELEASE_CRUNCH is defined.
We do support already IPv6 in the RELENG_4 boot floppies, and
vlan might be desirable as well.
2002-02-15 03:57:06 +00:00
Ian Dowse
cfd8a00918 In createfiles(), properly handle a number of cases where no further
volumes are available, instead of getting stuck in a loop calling
getvol(). Normally restore in 'x' or 'i' modes will ask for a new
(earlier) volume when the current inode number on the tape is greater
than the last inode to be restored, since there can be no further
inodes of interest on that volume. However we don't want to change
volumes in this case either if the user explicitly said that there
are no more tapes, or if we are looking at the first volume.

When no more volumes are available but there are still inodes that
we have not found, we now just fall through to the code that prints
out a list of any missing files, so the restore completes normally.
Also simplify the logic a bit by always returning to the start of
the main for(;;) loop whenever the volume has changed.

This should completely fix the "Changing volumes on pipe input" bug
that is often observed when restoring dumps of active filesystems.

PR:		bin/4176, bin/34604, misc/34675
2002-02-14 01:30:45 +00:00
Giorgos Keramidas
9cbb2a404d Typo fix: Usally -> Usually.
PR:		docs/34918
Submitted by:	Harry Newton <harry_newton@telinco.co.uk>
2002-02-14 01:21:07 +00:00
Ian Dowse
1603684d77 Fix a number of long-standing restore bugs in tape.c, mainly relating
to multi-volume restores:
 - In findinode(), keep a copy of header->c_type so that we don't
   exit the do-while loop until we have processed the current header.
   Exiting too early leaves curfile.ino set to 0, which confuses
   the logic in createfiles(), so multi-volume restores with the
   'x' command don't work if you follow the instructions and supply
   the tapes in reverse order.  This appears to have been broken
   by CSRG revision 5.33 tape.c (Oct 1992).
 - The logic in getvol() for deciding how many records to skip after
   the volume header was confused; sometimes it would skip too few
   records and sometimes too many, leading to "resync restore"
   warnings and missing files. Skip to the next header only when
   the current action is not `USING'. Work around a dump bug that
   sets c_count incorrectly in the volume header of the first tape.
   Some of the problems here date back to at least 1991.
 - Back out revision 1.23. This appeared to avoid warnings about
   missing files in the 'rN' verification case, but it made the
   problems with the 'x' command worse by stopping getvol() from
   even attempting to find the first inode number on the newly
   inserted tape. The bug it addressed is fixed by correcting the
   skipping logic as described above.
 - Save the value of `tpblksread' in case the wrong volume is
   supplied, because it is incremented each time we read a volume
   header. We already saved `blksread' for the same reson.
2002-02-13 12:06:58 +00:00
Ian Dowse
b6024ea8ed Don't refer to findinode()'s `complain' parameter in a comment; it
was removed in 1986.
2002-02-12 17:15:45 +00:00
Maxim Konovalov
e9ef556dd8 Correct an out of date device node name. We do not have /dev/rsd0.ctl
nowadays.

Spotted by:	Sergey Osokin <osa@freebsd.org.ru>
Reviewed by:	ken, ru
Approved by:	ken, ru
MFC after:	1 week
2002-02-11 14:35:28 +00:00
Dima Dorfman
d29a2061f2 Note what the default address_family is.
PR:		32463
Submitted by:	Gary W. Swearingen
2002-02-11 02:31:03 +00:00
Ian Dowse
ff5e109e47 Make dump's behaviour more sensible when the output file is a fifo.
Normally trewind() performs a close-open-close cycle to rewind the
tape when closing the device, but this is not ideal for fifos. We
now skip the final open-close if the output descriptor is a fifo.

PR:		bin/25474
Submitted by:	Alex Bakhtin <bakhtin@amt.ru>
MFC after:	1 week
2002-02-11 00:50:50 +00:00
Dima Dorfman
71717f5def Make it clear that dump(8)'s honoring of the UF_NODUMP flag is subject
to the -h option.  While here, xref chflags(1).

PR:		33907
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-02-10 22:14:09 +00:00
Maxim Konovalov
87c5e8ebc4 Document ping6(8) reaction to SIGINFO.
PR:		doc/33639
Reviewed by:	ru
Approved by:	ru
MFC after:	1 week
2002-02-07 16:50:02 +00:00
Maxim Konovalov
605af08d9f Document ping(8) reaction to SIGINFO.
PR:		doc/33639
Reviewed by:	ru
Approved by:	ru
MFC after:	1 week
2002-02-07 16:47:22 +00:00
Mark Murray
11658916d6 Minor grammar fixes. 2002-02-06 21:45:48 +00:00
Søren Schmidt
f5ec450932 Match the requirements of the new kernel structures. 2002-02-04 19:24:43 +00:00
Alfred Perlstein
b3dcd94961 If the dhcpd server doesn't provide a domain name or dns servers then
don't clobber /etc/resolv.conf

Add $FreeBSD.

Submitted by: an j. peterson" <rbw@myplace.org>
Verified fix in: dhcp-3.0.1rc6
PR: misc/34455
2002-02-01 18:46:58 +00:00
Joerg Wunsch
280a49ec4b Something i always wanted to see: add a function to print the list of
blocks allocated by some inode.  Indirect blocks are printed
recursively, so beware :), the list could become lengthy...
(We should probably add some output pager to fsdb.)

MFC after:	1 month
2002-01-26 15:53:23 +00:00
Joerg Wunsch
b81ba372c5 Avoid pointless initialization of global variables to 0. This only
bloats the resulting binary file by forcing them out of .bss into
.data, while the C standard already guarantees them to become
initialized to 0 at program startup.

MFC after:	1 week
2002-01-26 15:47:24 +00:00
Joerg Wunsch
aaadf6882c Don't exit with -1 if the user typed "quit".
MFC after:	1 week
2002-01-26 11:21:19 +00:00
Poul-Henning Kamp
6b67c2eed8 Fix some function prototypes.
Cure the "lets put everything in registers" ailment.
Set WARNS=2
Fix two problems where casting messed up large quotafiles.

PR:		34108
Submitted by:	Maxim Katargin <kmv@asplinux.ru>
MFC after:	3 weeks
2002-01-25 20:45:30 +00:00
Brian Feldman
bfb55e2f97 Remove a not-very-useful printf(3). 2002-01-25 18:33:40 +00:00
Brian Feldman
8660ce229c Allow fsdb the ability to work with entries named with whitespace embedded.
This works by retokenizing a line with a split limit so that if the
argument count for a command is greater than the number of arguments
formed by splitting apart the line of user input, the last argument
is instead all of the remainder of the input line.

Yes, I needed this capability at one point to fix a filesystem manually,
which happened to break with a problematic space-containing directory
entry.
2002-01-25 18:31:57 +00:00
Jens Schweikhardt
ac512bd99a Insert a missing paragraph break (.Pp).
MFC after:	3 weeks
2002-01-24 17:49:09 +00:00
Ruslan Ermilov
485318d4d8 Style.
Approved by:	ken
2002-01-24 16:53:08 +00:00
Maxim Sobolev
21367f05ab CG hard sentence breaks.
Submitted by:	ru
2002-01-23 09:35:55 +00:00
Maxim Sobolev
65ab9c78a3 Don't use `you'.
Submitted by:	ru
2002-01-22 21:11:18 +00:00
Maxim Sobolev
dcd7d9b7b7 Allow dump device be configured as early as possible using loader(8) tunable.
This allows obtaining crash dumps from the panics occured during late stages
of kernel initialisation before system enters into single-user mode.

MFC after:	2 weeks
2002-01-21 01:16:11 +00:00
Bill Fumerola
955052cf21 from select(2):
Any of readfds, writefds, and exceptfds may be given as nil
	pointers if no descriptors are of interest.

neither wfds nor efds were of interest so now they are nil.

also, do a little better then making an educated guess for nfds.
2002-01-20 12:13:28 +00:00
Matthew Dillon
170ac683f2 I've been meaning to do this for a while. Add an underscore to the
time_to_xxx() and xxx_to_time() functions.  e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard.  They will eventually be replaced when a real standard
comes out of committee.
2002-01-19 23:20:02 +00:00
Joerg Wunsch
7f3aade047 By popular demand, also include the "devlist" subcommand into the set
of commands available in the boot floppy environment.

MFC after:	1 week
2002-01-18 22:42:51 +00:00
Joerg Wunsch
075828a91a Well, RELEASE_BUILD_FIXIT has now been renamed into RELEASE_CRUNCH.
At least, the old version is still good for the MFC though (where
everything is still going the old way). ;-)
2002-01-18 22:17:35 +00:00
Kenneth D. Merry
5710d224b6 Add 'camcontrol rescan all' and 'camcontrol reset all' functionality to
camcontrol.

This enables rescanning all busses or resetting all busses in a system.
The current implementation is not the ideal way to do it -- the ideal way
to do it would be for the transport layer to handle wildcarded busses on
bus rescan and reset operations.  The current implementation enumerates all
the busses and sends a rescan or reset CCB individually.  Handling this
behavior in the transport layer will happen later.

Reviewed by:	imp
Tested by:	joerg
MFC after:	1 week
2002-01-18 18:00:00 +00:00
Ruslan Ermilov
7b6edd044b Introduce an interface announcement message for the routing
socket so that routing daemons and other interested parties
know when an interface is attached/detached.

PR:		kern/33747
Obtained from:	NetBSD
MFC after:	2 weeks
2002-01-18 14:33:04 +00:00
Joerg Wunsch
6437601ca1 Provide an option to make camcontrol `minimalistic': if the (env/make)
variable RELEASE_BUILD_FIXIT is defined, a camcontrol binary will be
built that only knows the "rescan" and "reset" subcommands.  The
resulting code is small enough to still fit onto the boot floppy.

Reviewed by:	ken
MFC after:	1 week
2002-01-17 20:26:14 +00:00
Jens Schweikhardt
22539cefa1 Fix typo by s/advertise/advertises/
MFC after:	4 weeks
2002-01-16 19:19:09 +00:00
Andrew R. Reiter
d0615c64a5 - Attempt to help declutter kern. sysctl by moving security out from
beneath it.

Reviewed by: rwatson
2002-01-16 06:55:30 +00:00
Ruslan Ermilov
3daff2423f Back out part of the revision 1.2 changes -- sendto(2) can
not return ENOBUFS for unreliable protocols like divert.

This should fix an issue when natd(8) keeps spamming already
full dummynet(4) queues with the same packet forever.

Spotted by:	chkno@dork.com
Explained by:	luigi
Reviewed by:	Ari Suutari <ari.suutari@syncrontech.com>
MFC after:	2 weeks
2002-01-15 17:07:56 +00:00
Ruslan Ermilov
e0e3eb757b First ping after a preload (-l) was sent undelayed.
PR:		bin/32354
Obtained from:	ping.c,v 1.61
2002-01-15 15:10:52 +00:00
Ruslan Ermilov
32af342f58 Fixed two bugs with the "-l preload" option:
- first ping after a preload was sent undelayed
- we could send more than -c packets in preload

PR:		bin/32354
2002-01-14 14:33:35 +00:00
Ruslan Ermilov
4880e93660 mdoc(7) police: tidy up the markup. 2002-01-10 16:02:23 +00:00
Ruslan Ermilov
6bfa982817 mdoc(7) police: tidy up the markup in revision 1.96. 2002-01-10 15:41:06 +00:00
Ruslan Ermilov
1f78c0cbd8 mdoc(7) police: tidy up previous delta. 2002-01-09 15:22:30 +00:00
Ruslan Ermilov
9f1741cac2 mdoc(7) police:
Restore (sorta) a useful piece of information that got lost in the
previous delta -- an ability to specify /prefixlength after an IPv6
address.
2002-01-09 15:10:31 +00:00
Dima Dorfman
d3c6bdee3f tunefs no longer outputs a warning if one tries to set soft-updates on
an unmounted filesystem.

PR:		32266
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
2002-01-07 07:01:52 +00:00
Dima Dorfman
eb2a17011c In the words of the submitter:
The first "synopsis" example has a "[/prefixlength]" which shouldn't
	be there, since that stuff is part of the preceeding "address" as is
	explained in the description of "address".

	(The way it is now, 192.168.0.1/16/prefixlength would be a proper
	operand.  Note that "prefixlength" is not mentioned by name anywhere.)

PR:		32462
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-01-07 06:51:19 +00:00
Dima Dorfman
e40fcc9819 In the words of the submitter:
disklabel(8)'s "Reading the disk label" section starts out "To examine
	or save the label on a disk drive,...".  This is confusing.  The given
	command (disklabel [-r] disk) doesn't save anything (except to standard
	out, but that should go without saying).  It reads as if the command
	might save something on the disk drive.

PR:		32452
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-01-07 06:45:17 +00:00
Robert Watson
e036a58dab o Note that packets diverted using a 'divert' socket, and then
reinserted by a userland process, will lose a number of packet
  attributes, including their source interface.  This may affect
  the behavior of later rules, and while not strictly a BUG, may
  cause unexpected behavior if not clearly documented.  A similar
  note for natd(8) might be desirable.
2002-01-03 01:00:23 +00:00
Yaroslav Tykhiy
c1201321e4 Move the discussion of how many times a packet will pass through
ipfirewall(4) to the IMPLEMENTATION NOTES section because it
considers kernel internals and may confuse newbies if placed
at the very beginning of the manpage (where it used to be previously.)

Not objected by:	luigi
2002-01-02 20:48:21 +00:00
Yaroslav Tykhiy
5b20d7fa96 Clarify the "show" ipfw(8) command.
PR:		docs/31263
Permitted by:	luigi
2002-01-02 20:16:15 +00:00
Yaroslav Tykhiy
a66dbdf331 Fix a typo: wierd -> weird 2002-01-02 19:46:14 +00:00
Doug Ambrisko
0d6fcb5c0e Fix bugs in the structure for rx_frame by making gap length one byte and
a packed array so sizeof work.  This broke RFMON mode and passing
up 802.11 packets.

The Linux emulation code was derived from the open source Linux driver to
maintain compatibility.

LEAP support is added, hints from Richard Johnson.  I've verified this
locally with PC350v42510.img firmware.  More bug fixing from Marco to
fix long passwords.

Change DELAYs in flash part of driver to FLASH_DELAY which uses tsleep
so it doesn't look like your system died during a flash update.

Install header files in /usr/include/dev/an

Cleanup some ifmedia bugs add "Home" key mode to ifmedia and ancontrol.
This way you can manage 2 keys a little easier.  Map the home mode into
key 5.  Enhance ifconfig to dump the various configured SSIDs.  I use
a bunch of different ones and roam between them.  Use the syntax similar
to the WEP keys to deal with setting difference SSIDs.

Bump up up the Card capabilities RID since they added 2 bytes to it
in the latest firmware.  Thankfully we changed it from a terminal
failure so the card still worked but the driver whined.

Some cleanup patches from Marco Molteni.

Submitted by:	Richard Johnson <raj@cisco.com>
		Marco Molteni <molter@tin.it>
		and myself
Various checks: David Wolfskill <david@catwhisker.org>
Reviewed by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
Approved by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
Obtained from:	Linux emulation API's from Aironet driver.
2001-12-31 22:01:44 +00:00
Joerg Wunsch
a38a8f75a4 Implement the option to disable IPv6 on an sppp interface (counterpart
to the kernel code just committed).

MFC after:	1 month
2001-12-30 20:43:09 +00:00
Ian Dowse
881c9063c7 Oops, the arguments to a bcopy() were reversed, which broke zeroing
of unused partition entries and later detection of unused entries.

Use memcpy to be consistent with the rest of the code, and fix a
minor style nit.

Submitted by:	bde
2001-12-30 18:51:51 +00:00
Poul-Henning Kamp
d58f005463 Allow setting of variables of type dev_t by indicating the name of
a special file on the command line, eg:
  sysctl kern.dumpdev=/dev/ad1s1b

In parse(), when a value is given for a CTLTYPE_QUAD variable,
newval and newsize erroneously fail to be set because of an early
"break".

show_var() contains code that duplicates the functionality of the
oidfmt() function.

PR:		33151, 33150
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
2001-12-30 10:33:34 +00:00
Julian Elischer
116f97b066 Fix documentation to match reality 2001-12-28 22:24:26 +00:00
Joerg Wunsch
0a17ab83f9 Clean up half a dozen of header files that are no longer needed now that
we use struct sppp_parms instead of struct sppp for userland programs.

MFC after:	1 month
2001-12-27 22:40:01 +00:00
Joerg Wunsch
e2aac1dd31 Userland part of making the LCP restart timer configurable.
Obtained from:	i4b (with changes)
2001-12-27 21:20:33 +00:00
Joerg Wunsch
979c74a0af Implement knobs to enable/disable VJ header compression.
Submitted by:	i4b (modified)
MFC after:	1 month
2001-12-27 16:52:23 +00:00
Alfred Perlstein
a2d440dae0 declare locally used globals as static. 2001-12-22 12:35:03 +00:00
Yaroslav Tykhiy
b6ee452478 Implement matching IP precedence in ipfw(4).
Submitted by:   Igor Timkin <ivt@gamma.ru>
2001-12-21 18:43:37 +00:00
Dima Dorfman
53d745bc7c Actually make use of the md_version field of 'struct mdio'. In order
not to needlessly break compatibility, decrement MDIOVERSION to 0.

Approved by:	phk
2001-12-20 06:38:21 +00:00
Poul-Henning Kamp
dc015e16dc Fix
md5 -q -s foo
to not expect input on stdin after hashing the string.

MFC after:      1 week
2001-12-19 21:19:43 +00:00
Ian Dowse
c5f6da70ca Ignore the value of fs_active when comparing superblocks.
Noticed by:	"Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
2001-12-17 01:33:27 +00:00
Mike Silbersack
45943e2284 Add comments on where to look if you wish to auto-load
modules at boot time.

MFC after:	1 day
2001-12-16 05:14:17 +00:00
Luigi Rizzo
6105f81565 Add code to export and print the description associated to sysctl
variables. Use the -d flag in sysctl(8) to see this information.

Possible extensions to sysctl:
 + report variables that do not have a description
 + given a name, report the oid it maps to.

Note to developers: have a look at your code, there are a number of
	variables which do not have a description.

Note to developers: do we want this in 4.5 ? It is a very small change
	and very useful for documentation purposes.

Suggested by: Orion Hodson
2001-12-16 02:55:41 +00:00
Sheldon Hearn
23eb26fa51 Kernel support for smbfs is only built on the i386 at the moment, so
limit the building and installation of the userland utilities to that
architecture for now.

Reported by:	bmah
2001-12-14 23:11:45 +00:00
Ralf S. Engelschall
43ce89e115 At least once mention the long names of WF2Q+ (Worst-case Fair Weighted
Fair Queueing) and RED (Random Early Detection) to both give the reader
a hint what they are and to make it easier to find out more information
about them.
2001-12-14 21:51:28 +00:00
Ruslan Ermilov
e237860a3c mdoc(7) police: add -p to the synopsis line as well. 2001-12-14 15:03:32 +00:00
Sheldon Hearn
85519b003a Add bmake glue for src/contrib/smbfs and connect userland smbfs
support to the build.

The MFC reminder below is subject to <re@FreeBSD.org> approval
prior to 4.5-RELEASE.

Reviewed by:	bp, fjoe
MFC:	1 week
2001-12-14 11:41:22 +00:00
Philippe Charnier
2651db53df spelling
move some err() calls to errx() when message explains the pb enough
do not set errno just before exiting the program
lowercase errx() strings
2001-12-11 18:36:29 +00:00
Philippe Charnier
f73eedd8a6 Spelling 2001-12-11 18:24:59 +00:00
Sheldon Hearn
3626f83327 Update the default newfs block and fragment sizes from 8192/1024 to
16384/2048.

Following recent discussions on the -arch mailing list, involving dillon
and mckusick, this change parallels the one made over a decade ago when
the default was bumped up from 4096/512.

This should provide significant performance improvements for most
folks, less significant performance losses for a few folks and
wasted space lost to large fragments for many folks.

For discussion, please see the following thread in the -arch archive:

Subject: Using a larger block size on large filesystems

The discussion ceases to be relevant when the issue of partitioning
schemes is raised.
2001-12-11 16:21:40 +00:00
Ruslan Ermilov
e21a315ec5 s/sysctl -w/sysctl/ 2001-12-11 08:29:10 +00:00
Guido van Rooij
28703190c5 Add new boot flag to i386 boot: -p.
This flag adds a pausing utility. When ran with -p, during the kernel
probing phase, the kernel will pause after each line of output.
This pausing can be ended with the '.' key, and is automatically
suspended when entering ddb.

This flag comes in handy at systems without a serial port that either hang
during booting or reser.
Reviewed by:	(partly by jlemon)
MFC after:	1 week
2001-12-10 20:02:22 +00:00
Sheldon Hearn
be42c56328 Fix typo: 'fragement' -> 'fragment' 2001-12-07 13:18:28 +00:00
David E. O'Brien
016298551c Files in subdirectories of directories that have the nodump flag set
are sometimes incorrectly being dumped.

The problem arises because the subdirectory only gets its entry
cleared from usedinomap if it is also present in dumpinomap, and it is
the absence of a directory in usedinomap that internally indicates
that the directory is under the effects of UF_NODUMP (either directly
or inherited).

PR:		32414
Submitted by:	David C Lawrence <tale@dd.org>
2001-12-05 20:42:52 +00:00
Kenneth D. Merry
8a8e67f308 Fix breakage in 'camcontrol defects' introduced in rev 1.34 (the new error
recovery code) back in March, 2001.

In effect, this brain-o would cause 'camcontrol defects' to always return
an error.

Pointed out by:	joerg
Tested by:	mdodd
2001-12-05 03:41:40 +00:00
Mike Barcroft
0db65eda3e Move the WARNS attribute down so that it also applies to the
RELEASE_CRUNCH case.
2001-12-05 02:29:23 +00:00
Ruslan Ermilov
830a9d770e mdoc(7) police: section 1 and 8 manpages document their exit
codes under the DIAGNOSTICS section, not RETURN VALUES, which
is for section 2, 3, and 9 manpages.
2001-12-04 16:17:35 +00:00
David E. O'Brien
17489e76f0 Actually I haven't enumerated the return values yet (thats why I hadn't
committed it yet).  So vague'ize the wording a little bit to make up
for it.
2001-12-04 02:26:47 +00:00
David E. O'Brien
2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Ruslan Ermilov
47af9353ea MTU and metric are available with NET_RT_IFLIST.
MFC after:	3 days
2001-12-03 15:12:45 +00:00
Robert Watson
1bd0b24685 o Update sysctl.8 to reflect renaming of various security-related
sysctls, and to introduce new ones.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-11-30 21:55:22 +00:00
Sheldon Hearn
629c25d4a9 Fix the example of suggested default settings. It stated that settings
were only of benefit to large filesystems, which recent research
suggests is not the case, and which the original author of the text
no longer endorses.
2001-11-27 19:39:07 +00:00
Sheldon Hearn
2441e154ef Correct the example introduced in rev 1.29, which suggested a block:frag
size ratio other than 8:1.  Currently, we only recommend an 8:1
ratio, because the impact of others ratios has not been adequately
investigated.

Also, do not recommend the use of the -c option in the example, since
newfs now automatically calculates the best cyl:cylgrp ratio.

This change was discussed with the author of rev 1.29.
2001-11-27 17:01:17 +00:00
Ruslan Ermilov
c0956cf876 Make -log_ipfw_denied active by default with -verbose.
Discussed with:	phk
2001-11-27 11:06:02 +00:00
Ruslan Ermilov
3843533e18 Fixed (local) style bugs in previous revision. 2001-11-27 11:00:16 +00:00
Dima Dorfman
525d500e72 Spelling police: sucessful -> successful.
Submitted by:	Anders Andersson <anders@codefactory.se>
2001-11-24 23:38:17 +00:00
Dima Dorfman
b94231daca Spelling police: "more then" - "more than" where appropriate. 2001-11-24 19:47:12 +00:00
Andrey A. Chernov
96f3cfa21e Fix decode table
PR:		32233
Submitted by:	Basileios Anastasatos <B.Anastasatos@MyRealBox.com>
2001-11-23 22:27:03 +00:00
Andrey A. Chernov
4599f01875 Add Greek conversion table
PR:		32119
Submitted by:	Basileios Anastasatos <B.Anastasatos@MyRealBox.com>
2001-11-20 18:55:16 +00:00
Ian Dowse
bf58d635ba Fix a large number of -Wall, -Wformat and -W compiler warnings.
These were mainly missing casts or wrong format strings in printf
statements, but there were also missing includes, unused variables,
functions and arguments.

The choice of `long' vs `int' still seems almost random in a lot
of places though.
2001-11-17 23:48:21 +00:00
Ian Dowse
25211b35bf Give a more useful diagnostic when an extraneous hard link to a
directory is encountered. This includes the full path of the
directory that will be removed if the user answers "y" to the
"REMOVE?" question.

PR:		bin/226851
Submitted by:	KOIE Hide <hide@koie.org>
MFC after:	1 week
2001-11-17 22:46:36 +00:00