Commit Graph

3224 Commits

Author SHA1 Message Date
Gordon Tetlow
f960342bca Unhook sbin/nfsd and sbin/mountd from the build. They will be moving to
/usr/sbin shortly.

Reviewed by:	jake (mentor)
2002-07-07 22:14:40 +00:00
Hajimu UMEMOTO
406166da3b Don't explicit kill of the process' own pid.
PR:		bin/38862
Submitted by:	Martin Faxer <gmh003532@brfmasthugget.se> with some modification
MFC after:	1 week
2002-07-07 18:19:48 +00:00
Ian Dowse
325167c3a5 Fix some printf format errors.
Submitted by:	Don Lewis <dl-freebsd@catspoiler.org>
2002-07-07 12:30:20 +00:00
Philippe Charnier
629e80effb The .Nm utility. 2002-07-06 19:35:14 +00:00
Philippe Charnier
960368f7ff The .Nm utility. Add FreeBSD Id. 2002-07-06 19:34:37 +00:00
Philippe Charnier
e1205e80e5 The .Nm utility 2002-07-06 19:34:18 +00:00
Luigi Rizzo
5e43aef891 Implement the last 2-3 missing instructions for ipfw,
now it should support all the instructions of the old ipfw.

Fix some bugs in the user interface, /sbin/ipfw.

Please check this code against your rulesets, so i can fix the
remaining bugs (if any, i think they will be mostly in /sbin/ipfw).

Once we have done a bit of testing, this code is ready to be MFC'ed,
together with a bunch of other changes (glue to ipfw, and also the
removal of some global variables) which have been in -current for
a couple of weeks now.

MFC after: 7 days
2002-07-05 22:43:06 +00:00
Maxim Konovalov
4fba6582cb o Change almost all magic numbers to the appropriate constants.
o Fix zero payloading, unbreak ping -s 0.
o Increase socket recieve buffer, ping -s 65467 is working now.

Submitted by:	anti-magic sweep based on kris's patch
Reviewed by:	bde, silence on -audit
MFC after:	2 months
2002-07-05 11:52:54 +00:00
Maxim Konovalov
301207dffe More strict ip options parsing.
Reviewed by:	bde (style), silence on -audit
MFC after:	2 months
2002-07-05 11:47:33 +00:00
Archie Cobbs
0099af422c Update my email address. 2002-07-03 20:50:32 +00:00
Mark Murray
c822396536 Apply __FBSDID(); fix local variable(names) that stomp on global
definitions; fix some const strings; fix some signedness issues.
2002-07-03 16:43:11 +00:00
Mark Murray
06e8d9547c Apply __FBSDID(), ISOfy, fix easy warning. 2002-07-03 16:38:04 +00:00
Tom Rhodes
ee662b5963 Minor spelling and grammar fixes in the atacontrol(8) manual page.
PR:	39393
2002-07-02 18:00:20 +00:00
Luigi Rizzo
9758b77ff1 The new ipfw code.
This code makes use of variable-size kernel representation of rules
(exactly the same concept of BPF instructions, as used in the BSDI's
firewall), which makes firewall operation a lot faster, and the
code more readable and easier to extend and debug.

The interface with the rest of the system is unchanged, as witnessed
by this commit. The only extra kernel files that I am touching
are if_fw.h and ip_dummynet.c, which is quite tied to ipfw. In
userland I only had to touch those programs which manipulate the
internal representation of firewall rules).

The code is almost entirely new (and I believe I have written the
vast majority of those sections which were taken from the former
ip_fw.c), so rather than modifying the old ip_fw.c I decided to
create a new file, sys/netinet/ip_fw2.c .  Same for the user
interface, which is in sbin/ipfw/ipfw2.c (it still compiles to
/sbin/ipfw).  The old files are still there, and will be removed
in due time.

I have not renamed the header file because it would have required
touching a one-line change to a number of kernel files.

In terms of user interface, the new "ipfw" is supposed to accepts
the old syntax for ipfw rules (and produce the same output with
"ipfw show". Only a couple of the old options (out of some 30 of
them) has not been implemented, but they will be soon.

On the other hand, the new code has some very powerful extensions.
First, you can put "or" connectives between match fields (and soon
also between options), and write things like

ipfw add allow ip from { 1.2.3.4/27 or 5.6.7.8/30 } 10-23,25,1024-3000 to any

This should make rulesets slightly more compact (and lines longer!),
by condensing 2 or more of the old rules into single ones.

Also, as an example of how easy the rules can be extended, I have
implemented an 'address set' match pattern, where you can specify
an IP address in a format like this:

        10.20.30.0/26{18,44,33,22,9}

which will match the set of hosts listed in braces belonging to the
subnet 10.20.30.0/26 . The match is done using a bitmap, so it is
essentially a constant time operation requiring a handful of CPU
instructions (and a very small amount of memmory -- for a full /24
subnet, the instruction only consumes 40 bytes).

Again, in this commit I have focused on functionality and tried
to minimize changes to the other parts of the system. Some performance
improvement can be achieved with minor changes to the interface of
ip_fw_chk_t. This will be done later when this code is settled.

The code is meant to compile unmodified on RELENG_4 (once the
PACKET_TAG_* changes have been merged), for this reason
you will see #ifdef __FreeBSD_version in a couple of places.
This should minimize errors when (hopefully soon) it will be time
to do the MFC.
2002-06-27 23:02:18 +00:00
Ian Dowse
8f42fb8fc9 Remove the kernel file-size limit for UFS2, so that only the limit
imposed by the filesystem structure itself remains. With 16k blocks,
the maximum file size is now just over 128TB.

For now, the UFS1 file size limit is left unchanged so as to remain
consistent with RELENG_4, but it too could be removed in the future.

Reviewed by:	mckusick
2002-06-26 18:34:51 +00:00
Ian Dowse
6a26192ada Fix an integer overflow that causes fsck_ffs to crash when it
encounters very large file sizes in the filesystem.

Reviewed by:	mckusick
2002-06-26 16:40:25 +00:00
Alfred Perlstein
7b9136e8ea Remove old pre-TIRPC code for getting transport handles. The code that
follows spams over the contents of them making the removed code useless.
2002-06-25 22:55:53 +00:00
Greg Lehey
74fbc9bb5b Correct default location of history file.
Observed by:	Chris Bolt <chris-lists@bolt.cx>
2002-06-23 01:32:00 +00:00
Kirk McKusick
5e5d87ff36 Get rid of paranoia that zeros the boot block area as this has
bad effect on existing bootstraps.

Submitted by:	Jake Burkholder <jake@locore.ca>
Sponsored by:	DARPA & NAI Labs.
2002-06-22 22:44:09 +00:00
David E. O'Brien
7c7af54f15 This commit was generated by cvs2svn to compensate for changes in r98567,
which included commits to RCS files with non-trunk default branches.
2002-06-21 15:56:16 +00:00
David E. O'Brien
d9bc822f0f Sync with NetBSD.
* don't whine about non-regular files. It is perfectly normal to keep a
  CVS or RCS directory in /etc/rc.d.
* manpage tweak
2002-06-21 15:56:16 +00:00
David E. O'Brien
0dbbb2e416 Reduce the -I's as we don't need them all. 2002-06-21 15:52:05 +00:00
Bruce Evans
36ffadc954 Don't say that an umounted filesystem is required for -n. An unmounted
filesystem is no more or less required for -n than for any other option.
The previous commit clarified the actual requirement.
2002-06-21 09:57:34 +00:00
Kirk McKusick
1c85e6a35d This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by:	Poul-Henning Kamp <phk@freebsd.org>
2002-06-21 06:18:05 +00:00
Maxime Henrion
4ce86ffd17 nmount'ify unionfs further by using separate options instead
of passing a flags mount options.  This removes the include of
sys/fs/unionfs/union.h in mount_unionfs as it should be.

Reviewed by:	phk
2002-06-15 22:48:14 +00:00
Maxime Henrion
c3210a83c0 Convert UDF to nmount.
Reviewed by:	scottl
2002-06-15 22:40:13 +00:00
Hajimu UMEMOTO
331a2db8a9 Add eui64 option which fills interface index (lowermost 64bit of
an IPv6 address) automatically.
This should obsolete prefix(8).

Obtained from:	NetBSD
MFC after:	2 weeks
2002-06-15 15:35:24 +00:00
Gordon Tetlow
dde7cef3d2 Hook rcorder and rc.d into the build.
Submitted by:	Mike Makonnen
2002-06-13 22:26:15 +00:00
David E. O'Brien
2a9dee3a68 FreeBSDize the NetBSD Makefile so that this compiles. 2002-06-13 17:09:30 +00:00
Giorgos Keramidas
40e6916847 ANSIfy a few prototypes, thus fixing a few warnings.
Reviewed by:	grog
2002-06-09 02:20:58 +00:00
Hajimu UMEMOTO
56c5d32d37 Don't have -prefixlen 128 on host routes.
Obtained from:	KAME
2002-06-08 19:49:22 +00:00
Matthew N. Dodd
7224076dfe Use a larger data type to prevent counters wrapping so quickly.
Silence a warning.
2002-06-07 05:29:13 +00:00
Matthew N. Dodd
c44ed52b2e Sync this up with changes made in v1.8 of sys/netatm/atm_if.h 2002-06-07 05:25:10 +00:00
Gordon Tetlow
b60563db4e Remove the old nextboot from Whistler. AFAIK this hasn't been useable in
quite a while and only works on i386.
2002-06-06 20:20:58 +00:00
Poul-Henning Kamp
d266a28647 s/daddr_t/ufs_daddr_t/g
This should fix the issues which cropped up after daddr_t grew up.

Sponsored by:	DARPA & NAI Labs.
2002-06-06 19:59:46 +00:00
Gordon Tetlow
045e9d6c14 Unhook the old nextboot(8) from the build. If no one yells too loudly, this
will be accompanied by a cvs rm of the actual nextboot sources.

Approved by:	jake (mentor)
2002-06-06 19:26:15 +00:00
Giorgos Keramidas
731867d068 Add 'utility' in a place that it was missing.
PR:		docs/38814
Submitted by:	Chris Pepper <pepper@rockefeller.edu>
MFC after:	10 days
2002-06-05 23:39:56 +00:00
Ian Dowse
09dbd0701c Oops, unbreak parsing of the `type' field in getasciilabel(). I had
changed a `goto' to a `continue' in revision 1.52, but it continued
the wrong loop.

Noticed by:	bde
2002-06-05 08:11:28 +00:00
Gordon Tetlow
3600cbb7c4 Fix spelling nit in error message. 2002-06-05 01:06:33 +00:00
Marcel Moolenaar
acc6623066 Fix breakage caused by allocating the I/O buffer. There was a
sizeof(buf) lurking around that I missed.

PR: 38811
Submitted by: Adrian Colley <aecolley@spamcop.net>
2002-06-02 19:20:37 +00:00
Garrett Wollman
5c7417c4d1 Avoid construction which results in label at end of block. 2002-05-30 21:41:42 +00:00
Garrett Wollman
b055b157dc Fix syntax errors (labels with no statement). 2002-05-30 21:38:58 +00:00
Ruslan Ermilov
ee148739ad mdoc(7) police: nits. 2002-05-30 12:20:49 +00:00
Ruslan Ermilov
92dcf6fa35 mdoc(7) police: tidy up the markup and some wording. 2002-05-30 09:41:33 +00:00
Alfred Perlstein
448f7629ea correct comment (replace i386 with __i386__) 2002-05-30 07:12:12 +00:00
Jun Kuriyama
0196ba9cf8 Fix typos (s/IP6FILREWALL_VERBOSE/IPV6FIREWALL_VERBOSE/, s/netinet/netinet6/).
MFC after:	1 week
2002-05-30 07:01:58 +00:00
Ian Dowse
f1a7b7ee8d Fix some serious brain damage in the default block/frag/cpg parameters
that are used if none at all are specified for a partition. Don't
keep replaying the last field if we run out of fields when processing
a line. Use a 8:1 frag:block ratio for both defaults.

More work here is required. I think disklabel should not attempt
to choose default filesystem parameters, and instead let newfs pick
any defaults if required.

PR:		i386/38703
Reported by:	Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com>
2002-05-30 01:44:35 +00:00
Ian Dowse
67b46708ef Split out the code for parsing the partition specification lines
into a separate function to avoid some over-long lines.
2002-05-30 01:19:25 +00:00
Ruslan Ermilov
e07c0f6817 mdoc(7) police: markup nits. 2002-05-29 16:55:50 +00:00
Ruslan Ermilov
1fa8142d87 mdoc(7) police: nits. 2002-05-29 16:53:27 +00:00
Ruslan Ermilov
10cb9bd3d8 mdoc(7) police: nits. 2002-05-29 16:47:55 +00:00
Ruslan Ermilov
1ec84e5051 mdoc(7) police: nits. 2002-05-29 16:19:26 +00:00
Ruslan Ermilov
165aadc593 mdoc(7) police: tidy up the markup. 2002-05-29 16:14:00 +00:00
Gordon Tetlow
a72b2ac607 Correct the file that reboot -k creates so that it works with the new
nextboot functionality.

Reviewed by:	jake (mentor)
2002-05-28 21:15:49 +00:00
Marcel Moolenaar
6db5f8a79e Work around a memory fault on ia64 caused by having the 1MB buffer on
the stack in DoFile(). This needs some investigation. In the mean time
we do a one time malloc() for the buffer to have it on the heap instead.
2002-05-27 07:54:43 +00:00
Ruslan Ermilov
999ffea58a Respect -q with "add" and "delete". Document who respects -q.
PR:		bin/38531
2002-05-25 12:51:34 +00:00
Maxime Henrion
8b1a580640 Convert mount_ext2fs(8) to nmount(2).
Reviewed by:	iedowse
2002-05-24 17:39:37 +00:00
Alfred Perlstein
996076bbc7 Don't err(3) (and exit prematurely) when a sysctl's object size has
changed, instead just warn(3)
2002-05-24 08:34:18 +00:00
Gordon Tetlow
a119f25995 Add a nextboot script to make it easier to control the loader nextboot
support. Also, hook it up to the build.

Approved by:	jake (mentor)
2002-05-24 04:06:03 +00:00
Maxime Henrion
dfde808388 Convert mount_unionfs(8) to nmount. 2002-05-24 00:45:37 +00:00
Maxime Henrion
dc5d2b0281 Make mount_nullfs(8) use nmount(2) rather than mount(2) now
that nullfs has been converted to nmount.
2002-05-23 23:08:27 +00:00
Hajimu UMEMOTO
720bbc8244 Allow prefix/prefixlen syntax for IPv6 to have consistency
with IPv4.
2002-05-21 18:11:31 +00:00
Hajimu UMEMOTO
188450c746 Have RTF_HOST for /128 destionation. 2002-05-21 11:43:53 +00:00
Benno Rice
87efda010f Spread the word of PowerPC. 2002-05-21 04:25:24 +00:00
Hajimu UMEMOTO
5818927a00 Try to guess prefixlen for guessable cases.
- /0 if matches ::/128
- /64 if matches 2000::/3 and lowermost 64 bit is all 0
- /128 if matches 2000::/3 and lowermost 64 bit is non-zero 0

Obtained from:	KAME/NetBSD
2002-05-20 15:01:19 +00:00
Peter Wemm
51c20097df Turn nfsiod into a vfs loader and sysctl wrapper that controls the number
of nfsiod kernel threads being run.
2002-05-19 19:21:40 +00:00
Robert Watson
8b1febe499 Remove IFS from 5.0-CURRENT. This facilitates introducing UFS2 as
IFS had its fingers deep in the belly of the UFS/FFS split.  IFS
will be reimplemented by the maintainer at a later date once the UFS
implementation is in place.

Requested by:	adrian (maintainer)
2002-05-19 00:09:30 +00:00
Juli Mallett
5fab96cfa4 Move _PATH_WALL from dump and shutdown's local pathnames.h to paths.h. 2002-05-17 11:47:12 +00:00
Andrew R. Reiter
9727e2df7a - Further replacing of UM_* macros with the appropriate function call. I
am fairly certain that this should do it and that I may now remove the
  UM_ macros from port.h.  I will, however, wait a few days to ensure
  that these can be safely removed.
2002-05-17 00:30:06 +00:00
Andrew R. Reiter
7455bd51da - Replace UM_* macros by replacing them with the appropriate function
call.  These changes are similar to the ones made to atmarpd and scsp.
2002-05-17 00:20:40 +00:00
Hajimu UMEMOTO
9b1222a712 Don't install scriptdump which is written in Perl. This is
corresponding to removal of Perl from base system.
2002-05-16 15:44:08 +00:00
Tom Rhodes
3468b317cb more file system > filesystem 2002-05-16 04:10:46 +00:00
Ian Dowse
91ca1a918f Use fgetln to remove the static limit on the length of lines in
/etc/exports. Oversized lines were unlikely due to the large 10k
limit, but any found would cause mountd to exit with an error. Also
fix one or two compiler warnings.
2002-05-14 23:24:28 +00:00
Poul-Henning Kamp
3f2bb38c5c Match prototypes to functions over in fsck_ffs. 2002-05-14 09:40:33 +00:00
Ruslan Ermilov
89a600f197 Style. 2002-05-13 12:07:57 +00:00
Poul-Henning Kamp
e6d8584942 Remove unneeded include.
Sponsored by:	DARPA & NAI Labs.
Submitted by:	mckusick
2002-05-13 11:42:27 +00:00
Ruslan Ermilov
46f8fdc34e Removed now unused INTERNALSTATICLIB.
INTERNALLIB now implies NOPIC and NOPROFILE.
Removed gratuitous NOMAN.
2002-05-13 11:09:07 +00:00
Luigi Rizzo
ed81aa8668 Handle symbolic names for common ethernet types (ip, arp etc.)
Remove custom definitions (IP_FW_TCPF_SYN etc.) of TCP header flags
which are the same as the original ones (TH_SYN etc.)
2002-05-13 10:19:59 +00:00
Poul-Henning Kamp
381ee4c2e8 UFS2 preparation commit:
Remove support for converting old FFS formats to newer.

Submitted by:	mckusick
Sponspored by: DARPA & NAI Labs.
2002-05-12 23:44:15 +00:00
Poul-Henning Kamp
75766e179d Sigh, more BBSIZE related breakage.
Sponsored by:	DARPA & NAI Labs.
2002-05-12 21:37:08 +00:00
Luigi Rizzo
d61ee39cd5 Main functional change is the implementation of matching of MAC header
fields as discussed in the commit to ip_fw.c:1.186

On top of this, a ton of non functional changes to clean up the code,
write functions to replace sections of code that were replicated
multiple times (e.g. the printing or matching of flags and options),
splitting long sections of inlined code into separate functions,
and the like.

I have tested the code quite a bit, but some typos (using one variable
in place of another) might have escaped.

The "embedded manpage" is a bit inconsistent, but i am leaving fixing
it for later. The current format makes no sense, it is over 40 lines
long and practically unreadable. We can either split it into sections
( ipfw -h options  , ipfw -h pipe , ipfw -h queue ...)
or remove it altogether and refer to the manpage.
2002-05-12 20:52:21 +00:00
Poul-Henning Kamp
77068a7fe2 Retire the bogus uses of the disklabel field d_sbsize and begin to
initialize it to zero so we don't have to have everbody and their
aunt including FFS specific header files.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:49:41 +00:00
Dima Dorfman
11612afabe s/demon/daemon/ 2002-05-12 00:22:38 +00:00
Maxime Henrion
eb4ebb056c Fix a typo : ".Xr mount_udf 8," -> ".Xr mount_udf 8 ,". 2002-05-11 19:32:24 +00:00
Brian Somers
aaa348891f Reword the ``alias'' description slightly. We must specify a non-conflicting
netmask - not necessarily 0xffffffff.

MFC after:	3 days
2002-05-11 11:35:35 +00:00
Alfred Perlstein
4a21733e2d unbreak build: include string.h for strcmp prototype. 2002-05-11 03:07:38 +00:00
Josef Karthauser
1063e12617 Replace /kernel with /boot/kernel/kernel.
PR:		docs/37757
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-09 11:47:42 +00:00
Andrey A. Chernov
76d3dc5297 Don't forget to null-terminate string we got from sysctl (f.e. in 'A' format).
Stack garbadge may be printed otherwise.
2002-05-08 23:49:19 +00:00
Tom Rhodes
32d4653993 'file system' > filesystem
add FILES section.

PR:		34239
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-05-06 17:53:50 +00:00
Ian Dowse
a255f2f8fa Address a few minor style and consistency issues in revision 1.32.
Submitted by:	Joshua Goodall <joshua@roughtrade.net>
2002-05-06 15:15:51 +00:00
Marcel Moolenaar
fac09f6b79 Make argument to printf match format. 2002-05-06 08:27:21 +00:00
Luigi Rizzo
4f1e3c3c4c Fix a couple of problems which could cause panics at runtime:
+ setting a bandwidth too large for a pipe (above 2Gbit/s) could
   cause the internal representation (which is int) to wrap to a
   negative number, causing an infinite loop in the kernel;

 + (see PR bin/35628): when configuring RED parameters for a queue,
   the values are not passed to the kernel resulting in panics at
   runtime (part of the problem here is also that the kernel does
   not check for valid parameters being passed, but this will be
   fixed in a separate commit).

These are both critical fixes which need to be merged into 4.6-RELEASE.

MFC after: 1 day
2002-05-05 21:34:10 +00:00
Maxime Henrion
d9219dcc1b Fix the fallback to mount(2) with RELENG_4 kernels and -CURRENT
utilities by catching SIGSYS.

Submitted by:	bde
2002-05-05 10:08:04 +00:00
Bill Fenner
edc4f96e24 - revert back to vmcore.#
- reimplement -z
- use syslog()
- improve consistancy of messages
- allow -f to recover cleared dumps
- return bufsize to 1024 * 1024
- return the ability to write sparse files
- update man page
- fix minfree to require 2k for info file instead of the kernel size
- include Berkeley copyright too due to amount of old code copied

Submitted by:	Chad David <davidc@acns.ab.ca>
2002-05-05 01:04:00 +00:00
Maxime Henrion
3203428dc5 Restore the minfree functionality into savecore. This patch
restores the check_space() function with small modifications
to make it work with the current code.  The patch was slightly
modified by Bill Fenner to handle error messages better.

Reviewed by:	fenner
2002-05-04 10:36:35 +00:00
Maxime Henrion
373f12f6e3 Swap the order of mount and nmount calls. We now call nmount
first, since all the consumers of mount_std in the tree have
been converted to nmount.
2002-05-02 20:52:04 +00:00
Ian Dowse
915a1dab22 Set the permissions on restored symbolic links.
PR:		bin/37665
Submitted by:	"Michael C. Adler" <mad1@tapil.com>
2002-05-02 17:39:19 +00:00
Kirk McKusick
088f357d12 Minor bug fixes uncovered while working on UFS2.
They should have no effect on existing systems.
2002-05-02 01:03:06 +00:00
Peter Wemm
37436e4075 Make this compile and not segfault on ia64. ptr = strdup("foo"); is
fatal if the declaration of strdup() isn't in scope.  The upper 32 bits
of the pointer are lost since it defaults to returning "int".  Fix some
warnings while here, including trying to make gcc-3.1 happy.
2002-05-01 06:49:43 +00:00
Peter Wemm
29ea697d8a Add a hack so that fdisk(8) can initialize an ia64 disk. There is
no /boot/mbr to read the boot code from (ia64 does not *have* bootblocks!).
fdisk depended on magic in the /boot/mbr file to initialize some fields.
2002-05-01 06:48:29 +00:00
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