Commit Graph

3468 Commits

Author SHA1 Message Date
ru
24514a3504 Fixed the abuses of .Ql visible on stderr in troff mode.
PR:		docs/37176
2002-12-23 16:04:51 +00:00
ru
d6e68e6e33 mdoc(7) police: fixed the misplaced .Bl call. 2002-12-23 15:36:04 +00:00
ru
8dc7d59515 mdoc(7) police: markup nits. 2002-12-23 15:30:40 +00:00
phk
6e40d66401 Solve another bug in the mapping code: correctly skip lock sectors.
Make sure sector zero is protected if it contains metadata.

Lower WARNS for gbde to 3 on non-i386 archs.  rijndael-fst is evil
but appearntly does the right thing and passes the test-vectors.

MFC Candidate.
2002-12-18 22:11:54 +00:00
phk
1655cee838 Fix two blunders in the mapping functions which can lead to corrupt data,
for request sizes larger than the sectorsize or for multi-key setups.

See warning mailed to current@ for details of recovery.

Found by:	Marcus Reid <marcus@blazingdot.com>
2002-12-18 19:57:27 +00:00
phk
9b48051f24 Untwist a twisty bit of logic which gcc for some reason cannot see
through on ia64.
2002-12-18 07:25:33 +00:00
imp
bdb42b11d0 Latest snapshot of devd. This one adds re-matching and string
expansion.
2002-12-18 07:08:01 +00:00
green
1a12b8fd81 Back out the previous commit, since there could be dire consequences if
/etc/rc were accidentally executed (as requested by other committeers).
2002-12-17 21:23:36 +00:00
green
089493d568 /home/green/tmp/cvsSFosXg 2002-12-17 20:39:38 +00:00
phk
e93f5b276e Straighten out a compound if() to improve readability marginally. 2002-12-17 19:33:44 +00:00
phk
1524523a7e A couple of stylistic improvements. 2002-12-17 19:16:10 +00:00
njl
53da64b40e Add PERIPH and XPT debug options to camcontrol. This makes all CAM debug
options tunable from userland.

Approved by:	ken
MFC after:	3 days
2002-12-17 06:05:21 +00:00
dillon
c2d085eb9b This is David Schultz's swapoff code which I am finally able to commit.
This should be considered highly experimental for the moment.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	3 weeks
2002-12-15 19:17:57 +00:00
trhodes
78a6feff06 Add a list of currently supported modes && an EXAMPLES section.
PR:		40465
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
2002-12-14 18:38:34 +00:00
imp
47b61dd8ba MFp4: Make ifs consistant with rest of file. 2002-12-13 19:47:07 +00:00
ru
4f5374cc7e mdoc(7) police: sort xrefs in SEE ALSO. 2002-12-13 16:53:51 +00:00
trhodes
d5471c6b92 Remove the incorrect information about dump(8) and snapshots. All the
dump(8) issues are assumed to be fixed.

PR:		46224
Submitted By:	Chris Knight <chris@aims.com.au>
Approved By:	re (murray)
2002-12-13 16:35:23 +00:00
ru
88d368906e Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
ru
d81157428b mdoc(7) police: overhaul. 2002-12-12 13:40:31 +00:00
ru
9c7f50509c mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-12 08:53:20 +00:00
trhodes
4e0898c20f mount_udf(8) is currently not in 4.X, so obviously it did not first appear
in 4.6

PR:		46117
Submitted by:	Ryuichiro Imura <imura@ryu16.org>
Approved by:	re (bmah)
2002-12-12 05:56:36 +00:00
grog
5927bb4adf vinum_info: Correct the print formats to allow for 64 bit pointers.
Approved by:	re (jhb).
2002-12-12 02:25:30 +00:00
ru
430882ef9e mdoc(7) police: Use the default .Os version.
Approved by:	re
2002-12-11 15:57:40 +00:00
ru
0ea6d24da9 mdoc(7) police: markup nits.
Approved by:	re
2002-12-09 13:06:34 +00:00
iedowse
58aed2a197 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
imp
1ae1ad9cf7 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
suz
db238728b1 corrected buffer lengths for memset()
obtained from: KAME
MFC after: 3 days
2002-12-06 02:11:31 +00:00
mckusick
14960b5d83 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
mckusick
d659faf40f 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
mckusick
7875b5f129 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
grog
a338717d3c 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
mckusick
1acde034d8 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
mckusick
4505ff3687 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
24207d3957 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
rwatson
00b4559455 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
phk
b6718e84ff 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
phk
cbcff09edb De-danglify the manual page.
Submitted by:	ceri
Approved by:	re (blanket)
2002-12-01 15:57:02 +00:00
marcel
b5264be992 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
mckusick
8b7fde3b06 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
6ca3f0d9c8 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
mckusick
abf5f450ac 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
mckusick
559c7a3a76 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
keramida
ea3af39908 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
bf02d63b46 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
95a7c4d11f 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
ru
4e92ab59ff mdoc(7) police: Nits.
Approved by:	re
2002-11-26 09:05:06 +00:00
ru
5dd6ebfe5d 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
ru
8a78e85de8 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
ru
3ef9a52d2c mdoc(7) police: Added missing markup bit.
Approved by:	re
2002-11-25 15:43:18 +00:00
julian
04eec3e219 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
keramida
948fcca7bb Typo fix that I brought in rev 1.16 2002-11-21 01:51:21 +00:00
mckusick
fdfc138094 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
13f1d09611 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
jhb
d5b4eeceb3 Fixup FILES section to use proper width and to use a cross-reference to
devd(8).
2002-11-18 21:07:48 +00:00
jhb
75b260abd4 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
imp
512efc01fa 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
e4f1622f37 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
b02bde29bd 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
mckusick
024ecf9628 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
42f1532277 update vlandev description; vlan code now auto-recognizes devices that
support h/w tagging
2002-11-15 00:31:49 +00:00
sam
96ef58b56a o display new interface capability bits
o capitilize capability bit strings for consistency

Approved by:	re
2002-11-15 00:02:21 +00:00
tjr
a30d806640 Install devd.conf(5). 2002-11-14 10:00:01 +00:00
jhb
2e4d03bd1d Try to reword things a bit more to make it clearer.
Reviewed by:	imp
2002-11-13 20:27:46 +00:00
jhb
080cee122b - 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
7923419c60 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
5a8e9123d8 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
bmah
566e6fd08c Fix one misspelling and two punctuation nits. 2002-11-07 16:00:48 +00:00
maxim
7e6d122498 Kill EOL whitespaces, style(9) fix. 2002-11-06 15:09:34 +00:00
maxim
054c01d7f4 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
jhb
f9e985b8ee 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
jmallett
1277a024bb 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
09d0b98ef1 Hook the new nextboot(8) manpage up to the build. 2002-11-04 17:39:54 +00:00
gordon
7c025e60e2 Add a nextboot manual page.
Spotted by:	brandt@fokus.gmd.de
2002-11-04 17:35:22 +00:00
phk
7d6f6584d5 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
scottl
65ffab11fa 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
e6b1a11df7 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
25a6a1f52c 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
phk
34d26f1f2b Give a meaningfull diagnostic when we cannot determine the filesystem type. 2002-10-31 15:32:39 +00:00
phk
7b27da90ba Initialize the new salt field in the lock sector.
Sponsored by:	DARPA & NAI Labs
2002-10-30 22:14:34 +00:00
luigi
0112a61b4c Misc fixes from Chris Pepper, plus additional explainations on
dummynet operation.

MFC after: 3 days
2002-10-28 07:03:56 +00:00
chris
10eb7743cc 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
nyan
6ed8f989d2 Merged various changes from src/sbin/fdisk/fdisk.c revisions up to 1.66. 2002-10-27 16:43:59 +00:00
phk
ffb12a084a 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
phk
60eaf90ecd 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
aaa20823ad 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
4c74c8cfaa Document the `maclabel' command.
Obtained from:	TrustedBSD Project
Sponsored by:	Network Associates Laboratories
2002-10-25 22:40:37 +00:00
marcel
517edcaa26 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
mux
559cbf6851 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
phk
d39855804b Report the MONITOR bit. 2002-10-24 17:23:52 +00:00
rwatson
88a54b8842 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
scottl
301cc7b273 Hook raidctl up to the build.
Submitted by:	tjr
2002-10-23 04:50:34 +00:00
rwatson
2bcf7f068c 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
081f0afc3e 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
jmallett
8ac3ee3960 Forgot to include <errno.h> when using 'errno' here. 2002-10-22 19:55:44 +00:00
jmallett
5cc8ad1dc7 When errno is not set, do not use warn(3). 2002-10-22 19:31:05 +00:00
jmallett
a496f0f492 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
10176b8bc8 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
phk
c2c1e35021 I overlooked an absolute path.
Submitted by:	Henric Jungheim <henric@attbi.com>
2002-10-21 05:25:02 +00:00
imp
f08ec6baf9 Add devd to the build. 2002-10-20 22:16:52 +00:00
imp
012767f50d 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