Commit Graph

3472 Commits

Author SHA1 Message Date
Ruslan Ermilov
fc412d1be7 mdoc(7) police: Use the default .Os version.
Approved by:	re
2002-12-11 15:57:40 +00:00
Ruslan Ermilov
7ba060236b mdoc(7) police: markup nits.
Approved by:	re
2002-12-09 13:06:34 +00:00
Ian Dowse
9d580d7c5f Slow down the operation of background fsck so as to leave some disk
bandwidth for other processes. Since the sleeping is done from
userland, this avoids the locking issues that affected the kernel
version.

The algorithm used here is to measure a moving average of the times
taken by a sample of read operations and then delay 1 in 8 reads
by 16 times the measured average. This should correspond to a factor
of 3 slowdown, but in practice the factor is larger (3.5 to 4) due
to hz rounding effects.

Reviewed by:	mckusick
Approved by:	re
2002-12-07 21:40:31 +00:00
Warner Losh
3054f218eb MFp4 (imp_freebsd branch): snapshot of devd work:
o improve parsing and lexing
o create data structures based on the parsed file now.
o Still need to rewrite main loop and add regex (still uses hard coded
  devd-generic)
o minor man page updates.

# There should be one more commit before rc2

Approved by: re (blanket)
2002-12-07 08:04:36 +00:00
SUZUKI Shinsuke
45289b43fb corrected buffer lengths for memset()
obtained from: KAME
MFC after: 3 days
2002-12-06 02:11:31 +00:00
Kirk McKusick
194a666749 Add the `L' option to dump to notify it that it is dumping a
live filesystem. To obtain a consistent dump image, dump takes
a snapshot of the filesystem and then does a dump of the snapshot.
The snapshot is removed when the dump is complete.

Also add an operator warning that the `L' option should be used
if dump is run on a live filesystem without the `L' option being
specified. The alternative would be to silently use a snapshot
any time that a live filesystem is dumped, but this change in
dump semantics seemed too drastic at this time.

Sponsored by:   DARPA & NAI Labs.
Approved by:	re
2002-12-03 18:21:09 +00:00
Kirk McKusick
6bfd0bdc80 Correct the estimated block count calculated by dump to account
for the minimal amount of space used by a snapshot.

Sponsored by:   DARPA & NAI Labs.
2002-12-03 05:12:53 +00:00
Kirk McKusick
69becf4a5e Properly handle UFS2 sparsely allocated inodes. The UFS2 filesystem
only preallocates a small number of inodes. The dump program tries
to scan through all the allocated inodes on a filesystem which
causes bad behavior if they have never been allocated. Thus dump
must calculate the set of inodes that have actually been allocated
and scan only those inodes.

Sponsored by:   DARPA & NAI Labs.
2002-12-03 05:10:07 +00:00
Greg Lehey
f2f632579f Relax partition overlap check to allow Vinum partitions to overlap
other partitiosns.  This is necessary when migrating conventional
partitions to Vinum and was broken by recent more stringent overlap
checks.  This is arguably the wrong way to do it.  A better method
would be to have the loader understand a subset of Vinum partitioning
and allow an install directly to Vinum, but until then, this is the
best we have.

Reviewed by:	jhb
Approved by:	re (rwatson)
2002-12-02 23:49:59 +00:00
Kirk McKusick
33493b1820 Correctly calculate the initial number of fragments in a filesystem
so that fsck does not complain with `SUMMARY BLK COUNT(S) WRONG IN
SUPERBLK' the first time it is run on a new filesystem.

Reported by:	Poul-Henning Kamp <phk@freebsd.org>
Sponsored by:   DARPA & NAI Labs.
2002-12-02 19:31:53 +00:00
Kirk McKusick
f033309fcd Verify that alternate superblocks have a correct magic number before
trying to use them. Set a minimum value for numdirs when using an
alternate superblock to avoid spurious numdirs == 0 error. Calculate
new fields when using an alternate superblock from a UFS1 filesystem
to avoid segment faulting.

Sponsored by:   DARPA & NAI Labs.
2002-12-02 19:30:37 +00:00
Marcel Moolenaar
2a944ecdef o Newer EFI implementations require that a GPT is preceeded by
a PMBR. Make sure the create command creates a PMBR as well
   (if not already present).
o  When parsing the MBR, explicitly check for a PMBR and create
   a PMBR map node if one is found.
o  When parsing the MBR, recurse to handle extended partitions.
   This allows us to flatten nested MBRs when migrating to a
   GPT.
o  Have the migrate command bail out if it encounters a partition
   it doesn't know how to migrate. This avoids data loss.
o  Change the output of the show command so that the UUIDs of the
   GPT partitions fit on the same line.
o  Show when partitions are extended partitions and add the PMBR
   type.

Approved by: re (blanket)
2002-12-02 01:42:03 +00:00
Robert Watson
622448fa77 Teach mdmfs how to pass UFS version numbers through to newfs. Because
of an argument name collision with -O, use -v, and default to whatever
the newfs default is for the platform (generally, UFS1).  This is
required to support diskless workstations that use UFS2 for their
mdmfs file systems.

Reviewed by:	dd, bmah
Approved by:	re (bmah)
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-12-01 23:19:57 +00:00
Poul-Henning Kamp
725490c68f Synchronize usage() with reality.
Semi-automatic handling of /dev prefix for device names.

Sponsored by:	DARPA & NAI Labs.
Approved by:	re (blanket)
2002-12-01 15:58:28 +00:00
Poul-Henning Kamp
03e58f67ae De-danglify the manual page.
Submitted by:	ceri
Approved by:	re (blanket)
2002-12-01 15:57:02 +00:00
Marcel Moolenaar
1efbdbe23b Add a manpage. Nobody expects the spanish inquisition, but the
mdoc(7) police... It's all yours ru :-)

Approved by: re (blanket)
2002-12-01 02:10:34 +00:00
Kirk McKusick
be5b142531 Mark snapshots so that dump will dump them as zero length
regular files rather than trying to interpret the snapshot.

Sponsored by:   DARPA & NAI Labs.
2002-11-30 23:28:22 +00:00
Marcel Moolenaar
b103cd4113 Allow aliases to be used when specifying partition types. The use of
UUIDs can then be limited to those cases when an alias doesn't exist.
This greatly increases the likelyhood that a sysadmin finishes the
partitioning without intermittent mental breakdowns. Current aliases
are "efi", "swap" and "ufs".

While here, staticize global variables and expand the usage message.

Approved by: re (blanket)
2002-11-30 22:51:46 +00:00
Kirk McKusick
41e20344a2 Add some more checks to newfs so that it will not build filesystems
that the kernel will refuse to mount. Specifically it now enforces
the MAXBSIZE blocksize limit. This update also fixes a problem where
newfs could segment fault if the selected fragment size was too large.

PR:		bin/30959
Submitted by:	Ceri Davies <setantae@submonkey.net>
Sponsored by:   DARPA & NAI Labs.
2002-11-30 18:28:26 +00:00
Kirk McKusick
ada981b228 Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by:	BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:   DARPA & NAI Labs.
2002-11-27 02:18:58 +00:00
Giorgos Keramidas
3d2209ae92 Align timestamps when -t is used in ipfw and ipfw2.
PR:		kern/44843
Approved by:	re (jhb)
2002-11-26 22:53:14 +00:00
Luigi Rizzo
12b5dc6a39 Fix a kernel panic with rules of the type
prob 0.5 pipe NN ....

due to the generation of an invalid ipfw instruction sequence.
No ABI change, but you need to upgrade /sbin/ipfw to generate the
correct code.

Approved by: re
2002-11-26 19:58:12 +00:00
Luigi Rizzo
99652d0eb2 Update documentation to match the behaviour of ipfw with respect
to net.inet.ip.fw.one_pass.
Add to notes to explain the exact behaviour of "prob xxx" and "log"
options.

Virtually approved by: re (mentioned in rev.1.19 of ip_fw2.c)
2002-11-26 19:51:40 +00:00
Ruslan Ermilov
8573f80562 mdoc(7) police: Nits.
Approved by:	re
2002-11-26 09:05:06 +00:00
Ruslan Ermilov
35cf61f671 mdoc(7) police: Fixed markup now that it was taken out of vendor branch.
Approved by:	re
2002-11-25 16:23:03 +00:00
Ruslan Ermilov
3706a3a87f mdoc(7) police: markup, spelling.
Also fixed a critical bug made in revision 1.62 by phk@.
2002-11-25 16:01:28 +00:00
Ruslan Ermilov
742ec8caad mdoc(7) police: Added missing markup bit.
Approved by:	re
2002-11-25 15:43:18 +00:00
Julian Elischer
bbed4456c1 Fsck needs to check each CG's rotor values to ensure thay are not -ve.
It seems a common corruption to have them -ve (I've seen it several times)
and if fsck doesn't fix it, it leads to a kernel pagefault.

Reviewd by: kirk
Submitted by: Eric Jacobs <eaja@erols.com> and me independently.
MFC in: 2 days
PR: bin/40967
Approved by: re
2002-11-24 21:41:42 +00:00
Giorgos Keramidas
8cf5e9dde2 Typo fix that I brought in rev 1.16 2002-11-21 01:51:21 +00:00
Kirk McKusick
a5a82fa863 Properly handle UFS2 sparsely allocated inodes. Fix bug that caused
the error "quotacheck: bad inode number 1 to nextinode".

Sponsored by:   DARPA & NAI Labs.
Reported-by:	Franky <franky@jasna.tarnow.pl> and Matthew Kolb <muk@msu.edu>
2002-11-20 02:13:32 +00:00
Chris Costello
f0732370dd o Bring the NOTICE section into the DESCRIPTION section and wrap it in
.Bf -emphasis ... .Ef
o Grammar/spelling

Sponsored by:	DARPA, NAI Labs
2002-11-18 22:56:41 +00:00
John Baldwin
b665be6839 Fixup FILES section to use proper width and to use a cross-reference to
devd(8).
2002-11-18 21:07:48 +00:00
John Baldwin
85fb48dae3 Remove leading ^ from example of match line in vendor-supplied rules since
the ^ is implicit at the beginning of the expressions.
2002-11-18 21:02:29 +00:00
Warner Losh
acbfae74e3 Add BUGS section and note departure of actual implementation from what
is documented so the pioneers will know why it works the way it does.
2002-11-18 07:16:47 +00:00
Julian Elischer
484c780433 Everything in the disklabel is unsigned so make all the input routines
take unsigned values.
his allows one to label disk with the number of blocks > 31 bits
(though less then 32 bits)

e.g.
#        size   offset fstype [fsize bsize bps/cpg]
  c: 3125755904  0   unused    0     0        # (Cyl.    0 - 194569*)
  d: 3125755840  64  unused    0     0        # (Cyl.    0*- 194569*)
which is needd to test UFS2
2002-11-18 04:58:11 +00:00
Peter Wemm
26e7777954 Deal with the possibility that time_t != int32_t. Otherwise ia64 thought
the fs_old_size was the half part of fs_old_time etc.
2002-11-17 23:50:41 +00:00
Kirk McKusick
59a825617f Properly calculate the initial number of fragments in a large filesystem.
Sponsored by:   DARPA & NAI Labs.
2002-11-15 23:50:14 +00:00
Sam Leffler
ac244ef31f update vlandev description; vlan code now auto-recognizes devices that
support h/w tagging
2002-11-15 00:31:49 +00:00
Sam Leffler
94da260035 o display new interface capability bits
o capitilize capability bit strings for consistency

Approved by:	re
2002-11-15 00:02:21 +00:00
Tim J. Robbins
9f887a80cf Install devd.conf(5). 2002-11-14 10:00:01 +00:00
John Baldwin
6616a2c799 Try to reword things a bit more to make it clearer.
Reviewed by:	imp
2002-11-13 20:27:46 +00:00
John Baldwin
1a1aec6aeb - Fix some minor grammar and spelling nits.
- Massage the wording in a few places.
- Put .Nm on lines by itself so it renders correctly.

Reviewed by:	imp
2002-11-13 19:31:04 +00:00
Peter Wemm
9866352ec7 Fix a "bug" in sysctl(8). Limit the length when we print a string from
the kernel rather than ignoring the length and keeping on going till we
finally hit a \0 character in the buffer.
2002-11-12 21:18:21 +00:00
Marcel Moolenaar
78edc0fda2 Remove inclusion of <sys/uuid.h>. We now include <sys/uuid.h> in
<sys/gpt.h>. This avoids having to include both <sys/uuid.h> and
<uuid.h>, which is considered by your friendly committer to be
aestheticly displeasing (= ballyhoo barf barf :-)
2002-11-10 20:22:25 +00:00
Bruce A. Mah
bec89d6c57 Fix one misspelling and two punctuation nits. 2002-11-07 16:00:48 +00:00
Maxim Konovalov
a54587ad70 Kill EOL whitespaces, style(9) fix. 2002-11-06 15:09:34 +00:00
Maxim Konovalov
d6abaeebeb Fix UID/GID options parsing.
PR:		bin/42579
Submitted by:	Belousov Oleg <oleg@belousov.com>
Approved by:	luigi
MFC after:	2 weeks
2002-11-06 14:57:18 +00:00
John Baldwin
8bc90fb220 Take sizeof() the right string for fspath's iovec. The old string was the
same size so this doesn't fix a bug, but it makes it cleaner.
2002-11-05 20:06:01 +00:00
Juli Mallett
dcf31dd107 Use more non-b0rked error reporting. Print the disk we are trying to open
and (we have the disk error from libufs? the disk error: the errno).

Requested by:	bde, <many>
2002-11-05 14:30:41 +00:00
Gordon Tetlow
e2b57789f8 Hook the new nextboot(8) manpage up to the build. 2002-11-04 17:39:54 +00:00
Gordon Tetlow
b277773de2 Add a nextboot manual page.
Spotted by:	brandt@fokus.gmd.de
2002-11-04 17:35:22 +00:00
Poul-Henning Kamp
5afa461402 Run a revision on the GBDE encryption facility.
Replace ARC4 with SHA2-512.
Change lock-structure encoding to use random ordering rather for obscurity.
Encrypt lock-structure with AES/256 instead of AES/128.
Change kkey derivation to be MD5 hash based.
Watch for malloc(M_NOWAIT) failures and ditch our cache when they happen.
Remove clause 3 of the license with NAI Labs consent.

Many thanks to "Lucky Green" <shamrock@cypherpunks.to> and "David
Wagner" <daw@cs.berkeley.edu>, for code reading, inputs and
suggestions.

This code has still not been stared at for 10 years by a gang of
hard-core cryptographers.  Discretion advised.

NB: These changes result in the on-disk format changing: dump/restore needed.

Sponsored by:   DARPA & NAI Labs.
2002-11-04 09:27:01 +00:00
Scott Long
d702a8542a Bring newfs_msdos into the GEOM world. Totally rewrite and simplify
getdiskinfo().  For the fixed-disk case, bpb->hid probably isn't
handled correctly, but I'm not sure if this is a serious problem since
the primary use of this program is to format floppy disks.

Reviewed by:    phk
2002-11-03 08:54:46 +00:00
Marcel Moolenaar
c1fd52ba74 o Remove the fallback implementations of uuid_create(),
uuid_from_string(), uuid_is_nil() and uuid_to_string().
o  Include <uuid.h> where appropriate.
2002-11-02 07:08:15 +00:00
Marcel Moolenaar
5f0d84ae9f o Replace 'struct uuid' with 'uuid_t',
o  Replace memcmp with uuid_equal(3),
o  Use uuid_to_string(3) to convert to UUIds to string.
2002-11-01 06:34:35 +00:00
Poul-Henning Kamp
5c63c8dd25 Give a meaningfull diagnostic when we cannot determine the filesystem type. 2002-10-31 15:32:39 +00:00
Poul-Henning Kamp
ab4be8c231 Initialize the new salt field in the lock sector.
Sponsored by:	DARPA & NAI Labs
2002-10-30 22:14:34 +00:00
Luigi Rizzo
4d5fe224c6 Misc fixes from Chris Pepper, plus additional explainations on
dummynet operation.

MFC after: 3 days
2002-10-28 07:03:56 +00:00
Chris Costello
d25beabfca Remove a line that reflected behavior that does not actually exist.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-28 03:46:32 +00:00
Yoshihiro Takahashi
5c4ff91fbb Merged various changes from src/sbin/fdisk/fdisk.c revisions up to 1.66. 2002-10-27 16:43:59 +00:00
Poul-Henning Kamp
a8ad364a7f Fix the regexp evilness so that fdisk can (again?) find the device
root is on from the root mount path.

Spotted by:	imp
2002-10-27 10:52:54 +00:00
Poul-Henning Kamp
8b4d099d5f Don't attempt to find the geometry with disklabel based ioctl, it just
issues a useless warning now.
2002-10-27 10:33:38 +00:00
Marcel Moolenaar
5d5e1c2b12 o Add functionality to add a GPT partition,
o  Use DCE compliant UUID functions and provide local
   implementations if they don't exist,
o  Move dumping of the map to show.c and print the
   partition type,
o  Some cleanups and rearrangements.

The default GPT partition type is UFS. When no starting block
or size are specified, the tool will create a partition in the
first free space it find (or that fits, depending on the size).
2002-10-27 03:23:05 +00:00
Chris Costello
76b4b15fcf Document the `maclabel' command.
Obtained from:	TrustedBSD Project
Sponsored by:	Network Associates Laboratories
2002-10-25 22:40:37 +00:00
Marcel Moolenaar
e6f737b346 Add the functionality to create an (empty) GPT from scratch. The
code is directly copied from migrate.c. The intend is to express
migrate in terms of create and add. The functionality to add
partitions is not yet there.
2002-10-25 05:23:08 +00:00
Maxime Henrion
7c697970f4 Fix ipfw2 panics on 64-bit platforms.
Quoting luigi:

In order to make the userland code fully 64-bit clean it may
be necessary to commit other changes that may or may not cause
a minor change in the ABI.

Reviewed by:	luigi
2002-10-24 18:04:44 +00:00
Poul-Henning Kamp
fb3133242f Report the MONITOR bit. 2002-10-24 17:23:52 +00:00
Robert Watson
97490f4b3c Rename ifconfig's "mac" argument to "maclabel" to prevent confusion
regarding 802.1 MAC and Mandatory Access Control (MAC).  Some
potential for confusion remains further in other areas of the
system regarding Message Authentication Codes (MAC).

Requested by:	wollman
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 22:50:04 +00:00
Scott Long
96c270b81c Hook raidctl up to the build.
Submitted by:	tjr
2002-10-23 04:50:34 +00:00
Robert Watson
2d58d642d2 Teach ifconfig(8) how to print and set the MAC labels on network
interfaces using the 'mac' argument.  Without MAC support in the
kernel, this does not change the behavior of ifconfig.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 03:40:47 +00:00
Marcel Moolenaar
fec26e0e4c Don't complain if we have an inconsistent map that may be the
result of an incomplete migration. An incomplete migration is
one where the MBR is not turned into a PMBR after creating the
GPT. This early in the game it's more convenient to allow the
inconsistency, because that avoids that we have to destroy the
MBR partitioning for now.
2002-10-23 03:33:06 +00:00
Juli Mallett
7d8939c53f Forgot to include <errno.h> when using 'errno' here. 2002-10-22 19:55:44 +00:00
Juli Mallett
b9125e9666 When errno is not set, do not use warn(3). 2002-10-22 19:31:05 +00:00
Juli Mallett
3fb61032c9 Use the libufs_printerror() function, which hopefully will deconfuse users
getting error cases in a libufsificated dumpfs(8).

Poked by:	kkenn
2002-10-22 19:27:09 +00:00
Maxim Konovalov
3c721ab3c9 Fix LSRR option length check: it has to be less or equal remained header's
length minus sizeof(struct ip).

MFC after:	1 week
2002-10-21 11:43:46 +00:00
Poul-Henning Kamp
936f458807 I overlooked an absolute path.
Submitted by:	Henric Jungheim <henric@attbi.com>
2002-10-21 05:25:02 +00:00
Warner Losh
5c6e14dbe5 Add devd to the build. 2002-10-20 22:16:52 +00:00
Warner Losh
e530e0446b devd. A daemon that hooks into the kernel's /dev/devctl to produce
arbitrary commands when devices come and go in the device tree (which is
different than the /dev directory).

This is an initial version.  Much of the planned power isn't here.
Instead of doing the full matching, we always run /etc/devd-generic.
/etc/devd.generic will go away at some point, I think.

I'm committing it in this early state so I can start getting feedback
from early adapters.

Approved by: re
2002-10-20 22:15:17 +00:00
Chris Costello
aa77750747 o Use .Cm for 'attach', 'detach', 'init', 'setkey', and 'destroy' commands
o Fix some punctuation and wording
o Wording consistency in command-line option documentation
o Make use of mdoc's markup a bit more (quoting and the like)

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-20 19:20:26 +00:00
Poul-Henning Kamp
930f6f2f6d s/dettach/detach/g etc.
Pointed out by:	chris
2002-10-20 19:08:56 +00:00
Poul-Henning Kamp
fa5dbec89f Use .PATH instead of VPATH.
Fix typo in man-page: man-section is 8.
2002-10-20 15:02:26 +00:00
Poul-Henning Kamp
d220f5beb9 Complete the Geom Based Disk Encryption: Add the OAM utility.
Sponsored by:	DARPA and NAI Labs
2002-10-20 11:16:13 +00:00
Scott Long
f9d186edc8 After much delay and anticipation, welcome RAIDFrame into the FreeBSD
world.  This should be considered highly experimental.

Approved-by:	re
2002-10-20 08:17:39 +00:00
Kirk McKusick
68aff0840c Clear the pending counts in the superblock after a successful run
of fsck so that the kernel does not complain about them being
non-zero when the filesystem is mounted.

Sponsored by:	DARPA & NAI Labs.
2002-10-19 05:36:48 +00:00
Kirk McKusick
ecfc865a4b Bound the size of the superblock to SBLOCKSIZE.
Submitted by:	BOUWSMA Beery <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:	DARPA & NAI Labs.
2002-10-18 23:17:30 +00:00
Giorgos Keramidas
8a7c201103 Typo in verb: zeros -> zeroes. 2002-10-18 01:05:46 +00:00
Marcel Moolenaar
271e5003bd Do not emit values as var=value while everything else looks like
XML. Emit the values as <var>value</var> for consistency.
2002-10-17 05:41:10 +00:00
Robert Watson
273500c258 s/clear/cleared/ for consistency (sigh)
Reported by:	dd
2002-10-16 05:03:40 +00:00
Robert Watson
c2cd97a3d0 Spell 'set' as 'cleared' where appropriate. 2002-10-15 21:23:22 +00:00
Robert Watson
81dc101cf6 Teach tunefs to print the ACL and multilabel flag information when
inspecting a superblock.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-15 18:14:05 +00:00
Robert Watson
a2325efeb1 Correct some of the style problems in this file:
I introduced a style problem when I sorted 'a' before 'A'; our
preferred order sorts 'A' first.  Correct.

Use .Cm instead of .Ar.

Submitted by:	bde
2002-10-15 15:30:55 +00:00
Robert Watson
289e09ee73 Introduce -a [enable|disable] and -l [enable|disable] flags to the tunefs
command, permitting it to set FS_ACLS and FS_MULTILABEL administrative
flags on UFS file systems.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-14 19:52:12 +00:00
Robert Watson
03d94b50e5 Teach mount(8) about MNT_ACLS for the purposes of mount options and
mount option printing.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-14 19:40:00 +00:00
Sean Chittenden
927a76bb5e Increase the max dummynet hash size from 1024 to 65536. Default is still
1024.

Silence on:	-net, -ipfw 4weeks+
Reviewed by:	dd
Approved by:	knu (mentor)
MFC after:	3 weeks
2002-10-12 07:45:23 +00:00
Jens Schweikhardt
b2aa8b2a98 Document that write(2) et al can return EROFS for attempts to write the
disk label area.

PR:		43891
Submitted by:	Diomidis D. Spinellis <dds@istlab.dmst.aueb.gr>
MFC after:	3 days
2002-10-10 19:16:10 +00:00
Giorgos Keramidas
f9e425b336 Make sure strsep() gets a nul-terminated string.
Reviewed by:	phk
2002-10-10 10:07:19 +00:00
Kirk McKusick
1546eccd21 When verifying a superblock, the lower bound on block size is MINBSIZE
(4096), not SBLOCKSIZE (8192).

Submitted by:	Tor.Egge@cvsup.no.freebsd.org
Sponsored by:	DARPA & NAI Labs.
2002-10-10 00:50:56 +00:00
Alfred Perlstein
9e9715e9c0 de-__P() 2002-10-10 00:32:55 +00:00
Juli Mallett
94c61219f5 Update documentation for kldload(8)'s ability to load multiple modules.
Submitted by:	Daniel O'Connor <doconnor@gsoft.com.au>
2002-10-09 06:46:54 +00:00
Yoshihiro Takahashi
6d8c8fabad Fix to support pc98. 2002-10-08 12:13:19 +00:00
Juli Mallett
d06c7584b6 Make it possible to kldload(8) many modules.
MFC after:	2 months
Sponsored by:	Bright Path Solutions
Reviewed by:	tjr
2002-10-08 09:57:03 +00:00
Dima Dorfman
e5d09546b8 Treat the pathptrn field as a real pattern with the aid of fnmatch(). 2002-10-08 04:21:54 +00:00
Thomas Quinot
2aeb6b2708 Document behaviour change in reboot(8) introduced in reboot.c rev. 1.17:
when using '-p' with reboot, and the power down action failds, reboot
the system normally. The behaviour of 'halt -p' and of shutdown(8) is
unchanged.

Approved by:	roberto
2002-10-07 21:18:20 +00:00
Yoshihiro Takahashi
d3647c0221 Don't use DPCYL and DPSECT macros. These are not needed.
Submitted by:	kawanobe@st.rim.or.jp (Kawanobe Koh)
2002-10-07 10:04:07 +00:00
Thomas Quinot
cfde77fbdf Set only the RB_POWEROFF flag (not the RB_HALT flag) when
'-p' is used on the reboot(8) command line.

This is intended for use when you want to attempt a power down
action, but you want the system to reboot (not halt) if the
power down action fails.

This is typically useful when the power-off action performed by
the kernel consists in signalling an uninterrupted power supply
that it should shut down its inverter if mains power has not returned.

The behaviour of shutdown(8) and init(8) is not modified;
only the behaviour of invoking 'reboot -p' manually is
modified, and then only in the case when a power-down action
fails.

Sounded reasonable to:	phk
Approved by:		roberto (mentor)
2002-10-06 16:24:36 +00:00
Poul-Henning Kamp
0cdbe32937 Don't be noisy if DIOCWLABEL fails, it's probably because we're writing
the first label to the raw disk.

Sponsored by:	DARPA & NAI Labs.
2002-10-05 21:57:05 +00:00
Yoshihiro Takahashi
bd8ab1f63e Include <sys/diskpc98.h> 2002-10-04 14:05:00 +00:00
Peter Wemm
a1c254d8c6 EFI GPT partitions use 'p' as a slice seperator. eg: da0p1 or da0p217.
(There is a theoretical limit of 16384 partitions)
2002-10-04 00:29:26 +00:00
Matthew N. Dodd
50479880a8 Cast malloc() assignments. 2002-10-02 06:24:19 +00:00
Dima Dorfman
8025c44b00 Add an -o option to exit after receiving one reply. This can be used
to test whether a link is live.

PR:		38573
Submitted by:	David Taylor <davidt@yadt.co.uk>
Obtained from:	NetBSD
2002-10-02 03:24:27 +00:00
Dima Dorfman
b6fcb4fec3 Don't crash when the user feeds us nonesense in the form:
ifconfig IF ether WHATEVER -alias

PR:		42544
Submitted by:	Mike Makonnen <makonnen@pacbell.net>
2002-10-02 02:17:59 +00:00
Poul-Henning Kamp
3f8322d6b8 Remove a comma trailing an if clause.
According to Kirk: "Luckily, the statement is usually true".

Spotted by:	FlexeLint
2002-10-01 17:31:28 +00:00
Bruce Evans
4fb133adea Changed "file system" back to "filesystem" in the usage message. English
rules don't apply to tokens that are supposed to represent single args.
This was only fixed in the man page.

Fixed other differences between the man page and the usage message (1
formatting bug and 1 syntax bug).
2002-10-01 13:44:15 +00:00
Poul-Henning Kamp
3bb24c35f2 Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.

These two new copies are still intact copies of disklabel.h and
therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them
in programs which already include <sys.disklabel.h> is currently a
no-op.

This commit adds a number of such #includes.

Once I have verified that I have fixed all the places which need fixing,
I will commit the updated versions of the three #include files.

Sponsored by:   DARPA & NAI Labs.
2002-10-01 07:24:55 +00:00
Matthew N. Dodd
492e1546ef - bzero() allocations.
- check for malloc() failures.
2002-09-30 09:00:03 +00:00
Matthew N. Dodd
f9f1b6f70f Turn warnings back on. 2002-09-30 08:59:16 +00:00
Poul-Henning Kamp
afbe3a0f81 Add the "Monitor" interface flag.
Setting this flag on an ethernet interface blocks transmission of packets
and discards incoming packets after BPF processing.

This is useful if you want to monitor network trafic but not interact
with the network in question.

Sponsored by:	http://www.babeltech.dk
2002-09-27 18:57:47 +00:00
John Baldwin
60d6cc883c Give up on a tty if opening it's special file returns ENOENT like we do for
ENXIO.

Glanced at by:	imp, gallatin
2002-09-27 16:02:28 +00:00
Poul-Henning Kamp
ea396d5bfa Don't show disklabel in the examples, it is not necessary. 2002-09-26 21:29:10 +00:00
Maxim Konovalov
3ec6f79c1e Do not dump core on 'ipfw add unreach': handling null strings in
fill_reject_code(). Please note ipfw/ipfw2.c is not affected.

PR:		bin/42304
Submitted by:	Andy@wantpackets.com
MFC after:	1 day
2002-09-25 11:22:36 +00:00
Mike Barcroft
89fdc4e117 Use the standardized CHAR_BIT constant instead of NBBY in userland. 2002-09-25 04:06:37 +00:00
Kirk McKusick
c18ef4c018 Add support to fsck_ffs to account for storage for extended
attributes.

Sponsored by:	DARPA & NAI Labs.
2002-09-24 05:18:17 +00:00
Maxim Konovalov
8bca894718 o Fix a typo.
o Remove EOL spaces.

Submitted by:	Harold Gutch <logix@foobar.franken.de> (typo patch)
Approved by:	luigi
MFC after:	3 days
2002-09-22 11:30:51 +00:00
Poul-Henning Kamp
b7e368f7c1 Don't disklabel(8) the md(4) device, it is not needed, and we don't want
to propagete BSD disklabels to architectures not already so polluted.

Sponsored by:	DARPA & NAI Labs.
2002-09-22 09:46:28 +00:00
Poul-Henning Kamp
1851342297 Failure to rewrite the disklabel should not be fatal.
Sponsored by:	DARPA & NAI Labs.
2002-09-22 09:41:41 +00:00
Poul-Henning Kamp
b9d05a16f4 Construct new disklabels based on the medias stated parameters in
userland, rather than expect all possible GEOMetries to know about
BSD disklabels.

Sponsored by:	DARPA & NAI Labs
2002-09-20 09:18:31 +00:00
Poul-Henning Kamp
7963fae61f Straighten out get_params().
Sponsored by:	DARPA & NAI Labs.
2002-09-20 08:12:51 +00:00
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Mike Barcroft
51f42932d1 Don't depend on <sys/types.h> pollution in <fcntl.h>. Sort includes. 2002-09-16 19:46:20 +00:00
Poul-Henning Kamp
6c7e64b65c I forgot fsdb was still sharing files with fsck. 2002-09-16 14:18:43 +00:00
Poul-Henning Kamp
5186921306 Add a source file where EXTATTR checks will happen and hook it in even
if it doesn't do anything yet.

Sponsored by: DARPA & NAI Labs.
2002-09-16 11:27:47 +00:00
Mike Barcroft
2c16ed2973 Don't depend on <sys/types.h> pollution in <fcntl.h>. Sort includes. 2002-09-16 08:34:08 +00:00
Poul-Henning Kamp
3f8ba8b5f8 Try to pick up disk geometry with specific DIOC* ioctls, rather than
expecting a bogo-disklabel to contain them, if possible.

This makes fdisk work with GEOM.
2002-09-15 16:08:52 +00:00
Maxime Henrion
fb624dbc80 Removed a debugging printf() left here in peter's
last commit.

Spotted by:	kris
2002-09-14 15:14:29 +00:00
Søren Schmidt
ed8a242cef Use the proper fields for security.
PR: 41870
2002-09-12 14:08:28 +00:00
Luigi Rizzo
4f531a5368 Store the port number in "fwd" rules in host format, same as ipfw1
has always done.

Technically, this is the wrong format, but it reduces the diffs in
-stable. Someday, when we get rid of ipfw1, I will put the port number
in the proper format both in kernel and userland.

MFC after: 3 days
(with re@ permission)
2002-09-12 00:45:32 +00:00
Peter Wemm
9b2196460d Commit "unrelated style fixes" part of Bruce's patch (regarding
bcopy/memcpy) seperately.

Submitted by:  bde
2002-09-11 18:16:40 +00:00
Peter Wemm
9d2b0ab82a Modify previous commit to solve the real problem that made gcc think
the timestamp was aligned.  ie: Use a void * instead of struct timeval *
which gcc assumes will be aligned.  Go back to memcpy().

Submitted by: bde
2002-09-11 18:12:29 +00:00
Jacques Vidrine
7e5bbd6847 In reference to previous commit: use err(3).
Noticed by:	bde
2002-09-09 18:51:59 +00:00
Jacques Vidrine
c3e3619908 Back out previous commit. I was a bit overzealous: the fd_set size is
calculated dynamically here.
2002-09-09 16:43:18 +00:00
Jacques Vidrine
012b8a4111 Check for FD_SET overrun. 2002-09-09 16:06:41 +00:00
Jacques Vidrine
ef9d72e14c Check for FD_SET overrun. 2002-09-09 15:58:08 +00:00
Marc Fonvieille
eea54e1396 Typo: s/o packet/on packet/
PR:		docs/42543
Submitted by:	Michael Lyngbøl <lyngbol@bifrost.lyngbol.dk>
2002-09-08 09:01:08 +00:00
Matthew N. Dodd
d4e731a642 Split cam_argmask and move "commands" into cam_cmdmask. This addresses
the issue of not having any free bits left for additional commands.

Approved by:	 ken
MFC after:	 4 weeks
2002-09-08 05:39:36 +00:00
Peter Wemm
4db5660477 Bandaid for mount_nfs segfaulting with the more obscure mount options
in /etc/fstab.  This isn't a real fix though and I'm still not sure
why it started failing.  mount(8) breaks up the nfs args into seperate
repeated '-o option=value' arguments.  But, the altflags variable that
we use to track things is incrementally built up each time we see the
next option and shows us the cumulative set of flags, not just the
flag that we are currently looking at.  As a result, the strstr hack
for looking up flags in a giant -o opt=val,opt=val, etc string was failing
and causing a segfault.  I do not know what changed recently that caused
this to suddenly break, but the code has been rather bogus for some time.
2002-09-06 19:59:29 +00:00
Matthew N. Dodd
f9cecca2d4 Add 'camcontrol load' as a complement to 'camcontrol eject'.
Approved by:	 ken
MFC after:	 4 weeks
2002-09-06 18:16:26 +00:00
Bruce Evans
23d8e0317a Removed vestiges of the -a and -d options.
Fixed other bugs in the usage message so that it matches the man page.
2002-09-06 13:16:24 +00:00
Poul-Henning Kamp
a9098c8910 Remove the -a maxcontig option, the kernel doesn't inspect fs_maxcontig
anymore.

Sponsored by:	DARPA & NAI Labs.
2002-09-06 07:59:10 +00:00
Tom Rhodes
5e152c7934 use 'file system superblock' for the error message. This will match other
disk utilities.

Discussed with:		bde
2002-08-31 21:34:54 +00:00
Giorgos Keramidas
b504cef7c5 Mention that fdisk(8) should be used to grow the containing slice
before growing partitions with growfs(8), if necessary.

PR:		docs/42148
Submitted by:	Chris S.J. Peron <maneo@bsdpro.com>
2002-08-29 08:12:09 +00:00