Commit Graph

4866 Commits

Author SHA1 Message Date
marcel
571405ddd6 Add an -f option (for force) to the create command. The -f option
allows the user to force the creation of a GPT even when there's a
MBR on the device. The MBR is simply wiped and any partitions
described by it are lost. Without the -f option one cannot create
a GPT when there's a MBR.
2004-11-13 05:13:33 +00:00
philip
2ed3258058 Reflect the cuaa->cuad namechange in documentation.
Might as well do them all while I'm at it :-)

Submitted by:	Steve Kargl <sgk@troutmask.apl.washington.edu>
2004-11-13 00:09:19 +00:00
marcel
3dc93f0071 Fix a braino: the partition size in the PMBR is in sectors, not bytes
and 'mediasz' is in bytes. As it so happens, we define 'last' as the
sector number of the last sector on the medium which also is the size
of the PMBR partition. Therefore, use 'last' instead of 'mediasz'.

Submitted by: Dan Markarian <markarian at apple dot com>
2004-11-12 04:34:46 +00:00
markm
e7bc4658b0 Help Tinderbox and remove mount_autofs 2004-11-10 22:15:04 +00:00
phk
1fcd5aef88 Add 0xbf as new partition id for Solaris.
Submitted by:	Lawrence.Lee@sun.com
2004-11-10 07:48:29 +00:00
dd
0d0c457d3a Bump .Dd, replace missing letter, and prefer to use a verb that
matches the option letter.

Submitted by:	ru
Should know better by now:	dd
2004-11-06 14:03:37 +00:00
ru
4a9db323b1 First there was an -m option.
Then Peter killed it and made it the default.
Then Brooks and Poul-Henning added it again.
Then Ruslan fixed the manpage...
2004-11-06 13:38:45 +00:00
pjd
d18ec52c75 For file backed md(4) devices output their source file via
'mdconfig -l -u <unit>'.
Bump version number, as this change breaks ABI/API.
2004-11-06 13:07:02 +00:00
dd
f2be7415a1 Remove a useless use of cat, strip overzealous punctuation, and
clarify some text.
2004-11-06 11:16:56 +00:00
dd
d4e5189342 Parse file mode with setmode(3) for consistency with other programs
that do this kind of thing.
2004-11-06 11:03:59 +00:00
dd
1cf63fa355 Update the description of -l to reflect reality. After mdconfig.c
1.25, -l without -u only lists the names, so specifying -u does more
than just limit the output to one device.
2004-11-06 10:21:12 +00:00
dd
f289f714cb If there aren't any devices to list, output nothing instead of an
empty line. This is consistent with other utilities.

While I'm here, remove artifacts of the previous list implementation.
2004-11-06 09:56:27 +00:00
pjd
1ea9917110 Note that sysctls documentation is missing. 2004-11-05 22:38:14 +00:00
ceri
f124567fde Grammatical and spelling improvements.
Reviewed by:	pjd
2004-11-04 19:12:43 +00:00
phk
19cb45350a Ups! Forgot to put "sbin" on the commit line:
Remove userland vinum(8) stuff.
2004-11-04 12:46:46 +00:00
bms
b272ba950c Fix markup: .Dv -> .Va
Update document dates.

Prodded by:	ru
2004-11-04 08:29:28 +00:00
bms
656137db84 Document the fact that blackhole routes normally need to be bound
to lo(4) interfaces to have an effect, and that this is not needed
when using IP fast forwarding.

Sponsored by:	eXtensible Open Router Project <URL:http://www.xorp.org/>
MFC after:	3 weeks
2004-11-04 02:15:03 +00:00
ceri
46aaa9be63 Be more clear that "bridged" is a synonym for "layer2".
PR:		docs/44400
Submitted by:	Constantin Stefanov <cstef at mail dot ru>
2004-11-03 21:51:34 +00:00
ru
f0fbc30e0d Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar
to PRECIOUSLIB from bsd.lib.mk.  The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.

Reviewed by:	oliver
2004-11-03 18:01:21 +00:00
pjd
09d8d105e4 Remove extra 's'.
Submitted by:	ceri
2004-11-03 17:31:09 +00:00
pjd
0b7692a343 Be more correct.
Submitted by:	ceri
2004-11-03 17:21:37 +00:00
pjd
a1ade15a09 Remove one more redundant 'not'. 2004-11-03 16:32:55 +00:00
pjd
c6ef06fc30 Remove redundant 'not'. 2004-11-01 15:46:21 +00:00
dd
b9ce406762 Replace link to nonexistent raid(4) with one to geom(8). I don't like
implying that geom(8) is a RAID solution, but it can be used for that
purpose, and a pointer in that direction is better than nothing.

PR:		73088
Submitted by:	Miguel Mendez <flynn@energyhq.es.eu.org>
2004-10-31 05:28:15 +00:00
marcel
6972147914 Remove the -k option to migrate. The option causes gpt(8) to preserve
the MBR after it is migrated to a GPT. While this was useful during
the early days when GPT support was under development, it's something
that users can use without knowing what they're getting themselves
into. The possible harm outweights the marginal usefulness it now has.
2004-10-31 02:20:17 +00:00
marcel
ad9026d0bd Remove useless inclusion of <sys/disklabel.h>
Obtained from: Dan Markarian <markarian at apple dot com>
2004-10-25 03:44:10 +00:00
marcel
f183d1d12b Declare variables as static, like I intended.
Obtained from: Dan Markarian <markarian at apple dot com>
2004-10-25 03:39:31 +00:00
marcel
8b8764c999 Fix bogon. Create the BSD label in the FreeBSD slice. 2004-10-25 03:29:21 +00:00
marcel
b9db7730bb Catch up with the BSD label changes. The partition offsets are relative
to the partition now. While here, make sure we skip unused partition
entries.
2004-10-25 03:27:31 +00:00
marcel
6f55e2c3d1 Build gpt(8) on all platforms. 2004-10-25 02:25:17 +00:00
marcel
187f216c02 Add byte swapping and UUID encoding/decoding to allow gpt to be compiled
on big-endian machines.

Obtained from: Dan Markarian <markarian at apple dot com>
2004-10-25 02:23:39 +00:00
ru
5db2b9d5b3 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
ru
a3d95ac7b4 Fixed misspelling of DPADD. 2004-10-24 14:25:53 +00:00
nyan
09adbfdf64 Merged from src/sbin/fdisk/fdisk.c revision 1.75.
(Don't prepend "/dev" if an argument given is an absolute pathname.)
2004-10-24 12:05:10 +00:00
des
5fcc302e9b Use %zu to format size_t instead of %jd and an intmax_t cast.
Approved by:	hamlet
2004-10-23 15:58:50 +00:00
phk
6720f62dc5 Stop amd64 warnings. 2004-10-23 12:42:18 +00:00
andre
7c8480e7f1 Refuse to unload the ipdivert module unless the 'force' flag is given to kldunload.
Reflect the fact that IPDIVERT is a loadable module in the divert(4) and ipfw(8)
man pages.
2004-10-22 19:12:01 +00:00
rwatson
049aec7270 Explicitly break out NETA license from Berkeley license to clearly
indicate license grant, as well as to indicate that NETA is asserting
only two clauses, not four clauses.

Requested by:	imp
2004-10-20 08:05:02 +00:00
ru
7d75b385f4 Don't prepend "/dev" if an argument given is an absolute pathname.
Reviewed by:	jhb
2004-10-20 05:43:45 +00:00
schweikh
b218555e7b Print a usage message if a non-option is specified.
MFC after:	3 weeks
2004-10-13 20:33:18 +00:00
imp
1d181e7321 The got_siginfo = 0 should have been got_sigalarm=0 to match the other
passes.

Submitted by: Dworkin Muller
2004-10-10 06:37:56 +00:00
csjp
379f33f67e Add a note to the man page warning users about possible lock order
reversals+system lock ups if they are using ucred based rules
while running with debug.mpsafenet=1.

I am working on merging a shared locking mechanism into ipfw which
should take care of this problem, but it still requires a bit more
testing and review.
2004-10-09 20:07:33 +00:00
le
630c724fcf Make fsck WARNS=2 clean. 2004-10-09 15:56:34 +00:00
scottl
bcad702d79 3 important fixes for growfs:
1) ginode() is passed a cylinder group number and inode number.  The inode
number is relative to the cg.  Use this relative number rather than the
absolute inode number when searching the cg inode bitmap to see if the inode
is allocated.  Using the absolute number quickly runs the check off the end
of the array and causes invalid inodes to be referenced.

2) ginode() checks the absolute indoe number to make sure that it is greater
than ROOTINO.  However, the caller loops through all of the possible inode
numbers and directly passes in values that are < ROOTINO.  Instead of halting
the program with an error, just return NULL.

3) When allocating new cylinder groups, growfs was initializing all of the
inodes in the group regardless of this only being required for UFS1.  Not
doing this for UFS2 provides a significant performance increase.

These fixes allow growing a filesystem beyond a trivial amount and have
been tested to grow an 8GB filesystem to 1.9TB.  Much more testing would
be appreciated.

Obtained from: Sandvine, Inc.
2004-10-09 02:53:47 +00:00
truckman
78abfd32f0 Eliminate linked list used to track inodes with an initial link
count of zero and instead encode this information in the inode state.
Pass 4 performed a linear search of this list for each inode in
the file system, which performs poorly if the list is long.

Reviewed by:    sam & keramida (an earlier version of the patch), mckusick
MFC after:	1 month
2004-10-08 20:44:47 +00:00
phk
d21b76886c Only print progress statistics once per second. 2004-10-08 10:50:40 +00:00
green
12529a8a9d Reference altq(4) instead of pf.conf(5).
Tip of the hat to:	mlaier
2004-10-08 03:31:09 +00:00
green
a5dc9b9268 Commit forgotten documentation for "diverted" rules. 2004-10-08 03:24:10 +00:00
des
cf2ba42b02 Promote mediasize and physmem to uintmax_t when comparing them. 2004-10-04 06:54:19 +00:00
des
72fbac0362 Whitespace nit. 2004-10-03 23:53:54 +00:00
des
b0b3b91c96 dumpon builds cleanly at WARNS level 6. 2004-10-03 23:39:14 +00:00
des
6ad3287252 Verify that the specified device is at least as large as hw.physmem. 2004-10-03 23:38:49 +00:00
des
67f651e056 Wrap some long lines (no content changes) 2004-10-03 23:35:34 +00:00
stefanf
f3f8ad79f6 Don't add integers to void pointers. 2004-10-03 15:48:32 +00:00
green
a1e8028c61 Remove blindly-copied extra include path. 2004-10-03 06:32:37 +00:00
mlaier
66f6852280 Remove -I from CFLAGS. This splipped in with the 3.5 import (as I was
building on a box with older pfvar.h installed). Didn't intend to commit it.

Requested by:	ru (on a C&P to ipfw's Makefile)
2004-10-03 06:19:22 +00:00
green
cb606898b9 Add support to IPFW for matching by TCP data length. 2004-10-03 00:47:15 +00:00
green
cdf18c02e6 Add the documentation for IPFW's diverted(-loopback|-output) matches. 2004-10-03 00:35:52 +00:00
green
4f70622005 Add support to IPFW for classification based on "diverted" status
(that is, input via a divert socket).
2004-10-03 00:26:35 +00:00
green
4454a09917 Remove accidentally-added O_DIVERTED section. 2004-10-03 00:24:42 +00:00
green
a1ab5f0c7d Add to IPFW the ability to do ALTQ classification/tagging. 2004-10-03 00:17:46 +00:00
pjd
631ed342dc Fix a deadlock in ggatel(8) simlar to one which was fixed some time
ago in md(4).

Submitted by:	Ivan Voras <ivoras@fer.hr>
2004-10-02 16:58:33 +00:00
ru
bf38b1ddea Fixed desctiptions of some options:
- Document better what the -C option means.
- The -c option is currently a no-op.
- The -D and -h options do not allow switching between
  single/dual console modes and internal/video consoles.
  (This used to be true for the old biosdisk boot code,
  but now they just force the multiple consoles mode and
  serial console, respectively.)
2004-09-30 09:59:44 +00:00
ru
3b4fb2446c FreeBSD has full support for multiple consoles since 2001. 2004-09-30 09:15:33 +00:00
maxim
9fddea1399 o Store timestamp in network byte order.
o Remove an assumption sizeof(struct timeval) == 8 (this is not
  true on sparc64).

Reviewed by:	imp, -hackers
Obtained from:	NetBSD (rev. 1.75)
MT5 after:	1 month
2004-09-30 07:35:56 +00:00
phk
d0514db4ed This is a small tool which will read an entire disk(partition) using
1M blocks and optionally write the read data to a file or disk.

If a read error happens, the 1M block gets put on the end of the worklist
and will be retried with 64k blocksize.

If a read error happens again, the 64k block gets put at the end of the
worklist and will be retried with single sector reads.

The program keeps trying until you stop it.

You can refresh a disk:

	recoverdisk /dev/ad1 /dev/ad1

or salvage a floppy:

	recoverdisk /dev/fd0 myfloppy.flp
2004-09-28 22:00:01 +00:00
imp
19102a399d Turns out that revision 1.52 was a bad idea. It broke the long
standing ability to list a non-existant device in /etc/ttys to keep it
from dying.  This is a documented feature of init(8):
     The init utility can also be used to keep arbitrary daemons running,
     automatically restarting them if they die.  In this case, the first field
     in the ttys(5) file must not reference the path to a configured device
     node and will be passed to the daemon as the final argument on its com-
     mand line.  This is similar to the facility offered in the AT&T System V
     UNIX /etc/inittab.

So rather than fix the man page to 'break' this feature, back out the change.

At the time this change was made, people felt that the spamage from
getty was annoying on headless consoles.  Andrew Gallatin noted:
> Most of my machines are headless without video cards and use a serial
> console.  With devfs this means that /dev/ttyv[1-N] do not exist and
> getty bitches like this:
>
> Sep 26 11:00:11 monet getty[543]: open /dev/ttyv1: No such file or directory

and we went off and applied this hack rather than fixing getty to
sleep forever when it gets an unknown device, as was Andrew's other
suggestion.  Since it breaks things, I'm off to do that instead.
2004-09-28 04:22:55 +00:00
obrien
813138db83 Embellish the man page after trying to migrate to gstripe from ccd(4). 2004-09-26 17:29:09 +00:00
pjd
22b4638287 Don't allow to specify wrong stripe size.
Reported by:	obrien
2004-09-26 17:15:42 +00:00
brooks
054309568c Sort the SEE ALSO list correctly. Update the document date.
Reported by:	ru
2004-09-23 15:26:01 +00:00
brooks
b4795a9f53 Refrence bsdlabel.8 and bsdlabel.5 rather then the obsolete disklabel.8
and disklabel.5.  Refrencing bsdlabel.5 is somewhat bogus as it is not
connected to the build and is mostly unwritten at this point.

Reported by:	Matthias Andree <matthias.andree at web.de>
PR:		docs/72020
2004-09-23 04:57:58 +00:00
csjp
88c0121fcb Since "d" is an array of 32 bit values, it is more
correct to change the cast from unsigned int to uint32_t.

Pointed out by:	luigi
2004-09-21 22:12:43 +00:00
ru
35fa627d61 Prepare for 5.x soon becoming -STABLE.
Pointed out by:	-current users
2004-09-19 14:30:59 +00:00
pjd
0eac437676 Fix '-s' option for large disks and fix printing maximum file system size. 2004-09-19 10:01:51 +00:00
pjd
90a205f3d4 Document '-p' flag for 'insert' command correct. 2004-09-18 19:02:10 +00:00
le
91a280661a Use correct format string.
Submitted by:   ssouhlal
2004-09-17 17:08:44 +00:00
pjd
2f0f4e47e4 Do not exit after printing usage, give geom(8) a chance to show standard
commands.
2004-09-17 08:41:15 +00:00
pjd
35d4149856 - Show all commands in usage, even if those commands are not available.
- When command is not available, just say it, instead of says, that command
  is unknown. Old behaviour seems to be too confusing.
2004-09-17 08:38:53 +00:00
pjd
67f6d06709 - Make md(4) 64-bit clean.
After this change it should be possible to use very big md(4) devices.
- Clean up and simplify the code a bit.
- Use humanize_number(3) to print size of md(4) devices.
- Add 't' suffix which stands for terabyte.
- Make '-S' to really work with all types of devices.
- Other minor changes.
2004-09-16 21:32:13 +00:00
sos
68af55d74a Distinguish between TCQ and NCQ type of tagged queing. 2004-09-15 11:22:05 +00:00
andre
eba7c4085c Make 'ipfw tee' behave as inteded and designed. A tee'd packet is copied
and sent to the DIVERT socket while the original packet continues with the
next rule.  Unlike a normally diverted packet no IP reassembly attemts are
made on tee'd packets and they are passed upwards totally unmodified.

Note: This will not be MFC'd to 4.x because of major infrastucture changes.

PR:		kern/64240 (and many others collapsed into that one)
2004-09-13 16:46:05 +00:00
alfred
536630fee2 WARNS=4 safe. 2004-09-12 07:06:48 +00:00
alfred
970c31768a Fix build. 2004-09-12 02:24:01 +00:00
alfred
0b5cabf950 Hook mount_autofs to the build. 2004-09-12 01:25:47 +00:00
csjp
b1981485f7 Currently when ipfw(8) generates the micro-instructions for rules which
contain O_UID, O_GID and O_JAIL opcodes, the F_NOT or F_OR logical
operator bits get clobbered. Making it impossible to use the ``NOT'' or
``OR'' operators with uid, gid and jail based constraints.

The ipfw_insn instruction template contains a ``len'' element which
stores two pieces of information, the size of the instruction
(in 32-bit words) in the low 6 bits of "len" with the 2 remaining
bits to implement OR and NOT.

The current code clobbers the OR and NOT bits by initializing the
``len'' element to the size, rather than OR'ing the bits. This change
fixes this by changing the initialization of cmd->len to an OR operation
for the O_UID, O_GID and O_JAIL opcodes.

This may be a MFC candidate for RELENG_5.

Reviewed by:	andre
Approved by:	luigi
PR:		kern/63961 (partially)
2004-09-11 19:44:29 +00:00
maxim
e510005b1a o Initialize a local variable and make gcc happy.
PR:		bin/71485
Submitted by:	Jukka A. Ukkonen
2004-09-10 13:42:24 +00:00
phk
d99f64fa38 Fix a type bug which sometimes wrote unusable lock sectors on the disk. 2004-09-10 12:16:54 +00:00
brooks
0073b704f8 The disk labels generated by bsdlabel can no address more than
0xffffffff sectors.  Document this limit and avoid installing bogus
labels on disks with more sectors.

Allowing the installation of labels addressing as much of the disk as
possiable may be a useful addition in some situations, but this was easy
to implement and should reduce confusion.

PR:		bin/71408
2004-09-09 07:46:53 +00:00
jmg
db223378ac add support for documented readonly option...
also print out the option that is unknow so that the user knows what (s)he
did wrong..

MFC after:	3 days
2004-09-08 20:28:29 +00:00
alfred
8337118014 sync with private code:
fix a 5.x'ism that 4.x needs protection from.
make this code compile standalone.
2004-09-08 08:44:14 +00:00
pjd
456c69d927 Fix/clean up return values checking. 2004-09-08 07:57:14 +00:00
pjd
75f67c7681 Allow to setup GBDE on providers which contain '/' in their names,
e.g. mirror/<name>, stripe/<name>.

Approved by:	phk
2004-09-06 13:42:09 +00:00
brooks
ba918da2a5 Use a spare byte in struct if_data to store the structure size without
increasing it.  Add code to ifconfig to use this size to find the
sockaddr_dl after the struct if_data in the routing message.  This
allows struct if_data to grow (up to 255 bytes) without breaking
ifconfig.

Submitted by:	peter
2004-09-01 18:22:14 +00:00
scottl
684e377891 Move back to WARNS=2 2004-09-01 08:26:39 +00:00
scottl
6703db1346 Create DIP_SET() and IBLK_SET() macros to fix lvalue warnings.
Inspired by: kan
2004-09-01 05:48:06 +00:00
alfred
e39e879ede Enter the autofs. 2004-08-31 16:26:01 +00:00
trhodes
d3a487d586 Correct a style bug: remove a gratuitous space between ( and ".
Ok'ed by:	fjoe
2004-08-31 05:19:57 +00:00
peter
78508cab26 Add a suffix descriptor for the acpi thermal values as a hint for the userland
sysctl tool to print a more readable value for temperatures.
2004-08-30 22:42:10 +00:00
pjd
5d5c60a5a5 When configuring RAID3 with verification option, force synchronization
of parity component, because we can't return an EIO error for read of
every sector which wasn't written first.

Discussed with:	phk
2004-08-30 22:08:00 +00:00
maxim
d003e4e10f o Restore a historical ipfw1 logamount behaviour: rules with 'log'
keyword but without 'logamount' limit the amount of their log messages
by net.inet.ip.fw.verbose_limit sysctl value.

RELENG_5 candidate.

PR:		kern/46080
Submitted by:	Dan Pelleg
MFC after:	1 week
2004-08-29 08:25:02 +00:00
pjd
826fb4fba8 Warn the user if we are not going to use the whole provider's space. 2004-08-28 02:49:28 +00:00
pjd
2d011d4672 Warn the user if we are not going to use whole provider space.
Requested by:	Michael Handler <handler@grendel.net>
2004-08-28 02:34:10 +00:00
pjd
bf3acf8f03 - If error string begins with "warning: ", don't exit, treat it as a warning
only.
- Use getprogname() function when informing about versions problem.
2004-08-28 02:29:40 +00:00
pjd
aa05ee70bc Fix 'show' command for pipes and queues.
PR:		bin/70311
Submitted by:	Pawel Malachowski <pawmal-posting@freebsd.lublin.pl>
MFC after:	3 days
2004-08-23 19:20:27 +00:00
pjd
529a80f729 Add missing GEOM classes, which are aware of geom(8).
Submitted by:	kuriyama
2004-08-23 06:23:17 +00:00
pjd
0f9a709922 Fix sysctl name. 2004-08-22 16:22:20 +00:00
pjd
7e2ef21ad9 Implementation of 'verify reading' algorithm, which uses parity data for
verification of regular data when device is in complete state.
On verification error, EIO error is returned for the bio and sysctl
kern.geom.raid3.stat.parity_mismatch is increased.

Suggested by:	phk
2004-08-22 16:21:12 +00:00
pjd
c3c6740d1a Implement new reading algorithm, which will use parity component for reading
as well, even if device is in complete state.
I observe 40% of speed-up with this option for random read operations,
but slowdown for sequential reads.
Basically, without this option reading from a RAID3 device built from 5
components (c0-c4) looks like this:

	Request no.	Used components
	1		c0+c1+c2+c3
	2		c0+c1+c2+c3
	3		c0+c1+c2+c3

With the new feature:

	Request no.	Used components
	1		c0+c1+c2+c3
	2		(c1^c2^c3^c4)+c1+c2+c3
	3		c0+(c0^c2^c3^c4)+c2+c3
	4		c0+c1+(c0^c1^c3^c4)+c3
	5		c0+c1+c2+(c0^c1^c2^c4)
	6		c0+c1+c2+c3
	[...]
2004-08-21 18:11:46 +00:00
jhb
e4ddba3ab3 Generalize the UFS bad magic value used to determine when a filesystem
has only been partly initialized via newfs(8) so that it applies to both
UFS1 and UFS2.

Submitted by:	"Xin LI" delphij at frontfree dot net
MFC:		maybe?
2004-08-19 11:09:13 +00:00
pjd
7418c74fe3 - Add a manual page for graid3(8) utility.
- Connect it to the build.
- Inform geom(8) about it.
2004-08-18 16:41:30 +00:00
pjd
f03be4709b Add a line to BUGS section about the need of implementation description. 2004-08-18 16:37:04 +00:00
pjd
e04dc12e69 Add some missing empty lines. 2004-08-18 16:14:24 +00:00
pjd
6dbbed758e Fix typo. 2004-08-18 16:09:20 +00:00
pjd
dde223fb01 Actually one can specify more than one device to stop. 2004-08-18 15:56:02 +00:00
pjd
beaa57d66f Ok, let's try again:
Add manual page for gmirror(8) utility.
2004-08-18 15:54:52 +00:00
pjd
b871b4b089 - Add a manual page for gmirror(8) utility.
- Connect it to the build.
- Inform geom(8) manual page about it.

Reviewed by:	trhodes
2004-08-18 15:48:18 +00:00
ru
c392760f6f Use a local "compress" symbol corresponding to a variable in BSS,
rather than the one from libz, corresponding to a function, when
linking statically.

PR:		bin/70392
2004-08-16 07:02:14 +00:00
pjd
5719aaaa5f Connect RAID3 GEOM class to the build. 2004-08-16 06:36:21 +00:00
pjd
8394d51046 Introduce GEOM RAID3 class, i.e. kernel module, which implements RAID3
transformation and graid3(8) userland utility, which can be used for
configuration. No manual page yet, sorry.

Hardware provided by:	Daniel Seuffert
2004-08-16 06:23:14 +00:00
stefanf
bcdeb8e73c Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +00:00
phk
1874b31277 Don't declare everything we find on a loopback interface for passive:
Only the actual loopback address should be declared passive, other
addresses are very likely to be desirable to announce.

Check for IFF_LOOPBACK instead of IFF_PASSIVE to determine if we have
an unknown interface type.
2004-08-14 08:36:35 +00:00
ru
8bb28f0420 Removed commented out bitrot. 2004-08-13 14:18:24 +00:00
csjp
d0ccd82499 Remove trailing whitespace and change "prisoniD" to "prisonID".
Pointed out by:	simon
Approved by:	bmilekic (mentor)
2004-08-13 02:50:59 +00:00
csjp
6661aed38d Add the ability to associate ipfw rules with a specific prison ID.
Since the only thing truly unique about a prison is it's ID, I figured
this would be the most granular way of handling this.

This commit makes the following changes:

- Adds tokenizing and parsing for the ``jail'' command line option
  to the ipfw(8) userspace utility.
- Append the ipfw opcode list with O_JAIL.
- While Iam here, add a comment informing others that if they
  want to add additional opcodes, they should append them to the end
  of the list to avoid ABI breakage.
- Add ``fw_prid'' to the ipfw ucred cache structure.
- When initializing ucred cache, if the process is jailed,
  set fw_prid to the prison ID, otherwise set it to -1.
- Update man page to reflect these changes.

This change was a strong motivator behind the ucred caching
mechanism in ipfw.

A sample usage of this new functionality could be:

    ipfw add count ip from any to any jail 2

It should be noted that because ucred based constraints
are only implemented for TCP and UDP packets, the same
applies for jail associations.

Conceptual head nod by:	pjd
Reviewed by:	rwatson
Approved by:	bmilekic (mentor)
2004-08-12 22:06:55 +00:00
pjd
3e11d41b47 The geom(8) utility needs dynamic linker functionality to work, so it can't
be staticaly linked.
This fixes problems on systems compiled with NO_DYNAMICROOT.
2004-08-12 13:15:52 +00:00
harti
d093c6fa50 Add support for the examination and modification of the devices.
This is implemented through SNMP and requires the ilmi daemon to
run on the system. To prevent bloat in rescue the atmconfig for
rescue is compiled without this stuff.
2004-08-12 12:31:43 +00:00
pjd
f0d4b9a881 Forgot to commit those: introduce hardcoded provider functionality,
which allow to store provider's name in the metadata and avoid
problems when few providers share the same last sector.
2004-08-10 19:52:12 +00:00
andre
649b4336f4 New ipfw option "antispoof":
For incoming packets, the packet's source address is checked if it
 belongs to a directly connected network.  If the network is directly
 connected, then the interface the packet came on in is compared to
 the interface the network is connected to.  When incoming interface
 and directly connected interface are not the same, the packet does
 not match.

Usage example:

 ipfw add deny ip from any to any not antispoof in

Manpage education by:	ru
2004-08-09 16:12:10 +00:00
des
d8c5c6847c The multiplier prefix is actually a multiplier suffix. 2004-08-09 14:43:50 +00:00
pjd
a98f255700 - Introduce option for hardcoding providers' names into metadata.
It allows to fix problems when last provider's sector is shared between few
  providers.
- Bump version number for CONCAT and STRIPE and add code for backward
  compatibility.
- Do not bump version number of MIRROR, as it wasn't officially introduced yet.
  Even if someone started to play with it, there is no big deal, because
  wrong MD5 sum of metadata will deny those providers.
- Update manual pages.
- Add version history to g_(stripe|concat).h files.
2004-08-09 11:29:42 +00:00
jmg
547a1b99a4 change the name of the md module, to g_md, introduce a define with the
name MD_MODNAME, and make mdconfig use this new define...
2004-08-09 06:45:20 +00:00
yongari
2b707fbd8f Fix long standing mediaopt setting bugs seen on sparc64. Though
the bug exists in little-endian machine, it was not triggered due
to the difference of memory ordering between little/big endian
machines. Instead of relying on possibly modified value during
function invokcations, use saved copy of ifr.ifr_addr.sa_family.
Also add a comment at the top of ifconfig.c clarifying the issue
so the bug won't re-appear.

Approved by:	jake
Reviewed by:	yar
2004-08-09 03:13:57 +00:00
des
9c026741d8 Use fallthrough to simplify the multiplier logic; optimistically add
support for the T multiplier; improve the error message for unrecognized
multipliers.
2004-08-08 23:14:44 +00:00
des
8cec0bf03f Fix some whitespace issues, and move a curly brace out of an #ifdef to
avoid confusing auto-indenting editors.
2004-08-08 23:11:43 +00:00
le
7776cca3b3 Due to popular demand, hook up geom_vinum to the build. 2004-08-07 16:16:59 +00:00
marcel
af16561272 Document the remove command. 2004-08-07 07:52:31 +00:00
marcel
aaf12b42bb Implement a remove command. The remove command iterates the GPT
partitions and removes any that matches the pre-conditions. The
options are the same for the add command and are used to select
the partitions to remove.
Currently the remove command without any options deletes all GPT
partitions. This is rather harmful and will need anti-footshooting
measures.
2004-08-07 07:41:37 +00:00
marcel
91c781f0d7 Use __FBSDID. 2004-08-07 06:24:25 +00:00
marcel
579a1870f9 o Save the partition number (=index) in the internal map. The index
starts at 1. No index is represented by 0.
o  Change the show command to display the partition number at the expense
   of the partition end columm. We already display the start and size.
o  Enhance the add command to accept the -i option. The -i option allows
   the user to specify which partition number the new partition should
   get.
o  Update the manpage accordingly.
2004-08-07 06:10:45 +00:00
pjd
5ce00478e0 Add and document kern.geom.stripe.fast_failed sysctl, which shows how
many times "fast" mode failed.
2004-08-06 10:19:34 +00:00
gordon
854b82db14 Now that we have gcc 3.4, we can flip ia64 to using a dynamically linked
/bin and /sbin.

Reviewed by:	marcel (via pluto1)
2004-08-06 00:07:26 +00:00
le
072b47a345 Allow 'create <filename>'. 2004-08-04 00:23:00 +00:00
marcel
d445c537c0 Add Linux swap partition and MS reserved partition descriptions.
While here:
o  Make the UUIDs static to avoid runtime initialization,
o  Rename ext to mslinux,
o  Replace the use of memcmp() with uuid_equal(),
o  Various style(9) improvements,
o  Order the comparisons based on importance,
o  Remove the word partition from all the descriptions,
o  Other description improvements.

Includes patch from: T. Muthu Mohan < Muthu_T at dell dot com >
2004-08-02 19:28:03 +00:00
marcel
7d35c7a3e7 What's in a name: s/disklabel/bsdlabel/ 2004-08-02 19:22:11 +00:00
pjd
27a1acf9e3 Don't use version number in library name. The library version is checked
after dlopen() anyway, so we should be safe.

Suggested by:	ru
2004-08-02 09:05:29 +00:00
stefanf
2e9ff9c3df - Signal handlers must have an int argument.
- Use prototypes.
- Add a cast for a signed vs unsigned comparison.
- Mark as WARNS?=3 clean.
2004-08-02 08:10:28 +00:00
pjd
237c75e898 After changing LIBDIR to SHLIBDIR, because of dependencies problems,
new problem shows up: symblic links (<libname>.so) are created under
/usr/lib/ now, instead of under /lib/geom/ where geom(8) looks for them.
Introduce a workaround to fix this by teaching geom(8) to open libraries
via /lib/geom/<libname>.so.<major_number> instead of /lib/geom/<libname>.so.
2004-08-01 22:24:07 +00:00
pjd
73d6fc0052 Use SHLIBDIR instead of LIBDIR. This should fix buildworld breakage.
Reported by:	des
2004-07-31 09:20:27 +00:00
pjd
0d74239c00 Add '-p' option for 'insert' command which allows to specify priority
of the new component.
Version number wasn't bumped (it should be), because I think there are
no geom_mirror users yet.
2004-07-31 00:54:44 +00:00
pjd
70045d465a Connect GEOM_MIRROR class to the build. 2004-07-30 23:18:53 +00:00
pjd
adaa0482b4 Add GEOM_MIRROR class which provide RAID1 functionality and has many useful
features. The gmirror(8) utility should be used for control of this class.
There is no manual page yet, but I'm working on it with keramida@.

Many useful tests provided by:	simon (thank you!)
Some ideas from:		scottl, simon, phk
2004-07-30 23:13:45 +00:00
pjd
7a7cae7b30 - Add '-S' option, which allow to specify sector size for transparent
provider.
- Bump version number.

This allows for a quite interesting trick. One can setup a stripe with
stripe size of 512 bytes and create transparent provider on top of it
with sector size equal to <ndisks> * 512. The result will be something
like RAID3 without parity disk (every access will touch all disks).
2004-07-30 08:19:22 +00:00
pjd
beead26532 Fix typo. 2004-07-30 08:03:46 +00:00
kan
ed22bf5a66 Make lookup_host function invocation parameter match its prototype. 2004-07-29 18:04:06 +00:00
le
e647ca0c36 Catch up with recent gcc changes and introduce a DIP_SET macro
to use when setting values that depend on the UFS version.
Raise WARNS again.
2004-07-29 11:28:24 +00:00
harti
7e404c358e No need to include if_var.h. 2004-07-28 16:34:42 +00:00
harti
1680a3ef6c Get rid of several unneeded includes (if.h, if_var.h, if_mib.h). 2004-07-28 16:32:17 +00:00
kan
75991fc0ed Downgrade WARNS level until GCC 3.4.2 warning are fixed. 2004-07-28 06:00:09 +00:00
kan
bce3675a33 Avoid casts as lvalues. 2004-07-28 05:59:22 +00:00
kan
8951be1606 Downgrade WARNS level until GCC 3.4.2 warning have been fixed. 2004-07-28 05:57:48 +00:00
yar
dc84e551bb Bump the date, .Dd, since the document content has been changed
in the previous commit.

Pointed out by:	ru
2004-07-27 09:51:49 +00:00
pjd
73a684d587 Improve geom(8)'s 'list' command to show geoms and their providers and
consumers. Teach STRIPE, CONCAT and NOP classes about this improvement.
2004-07-26 17:14:47 +00:00
pjd
3a2f13d5f5 Change naming scheme from /dev/<name>.stripe to /dev/stripe/<name>. 2004-07-26 16:10:27 +00:00
pjd
badd010cc7 Change naming scheme from /dev/<name>.concat to /dev/concat/<name>. 2004-07-26 16:08:32 +00:00
stefanf
4cf0522899 Assign the result of getopt() to an int rather than to a char (which is
possibly unsigned).
2004-07-26 15:04:57 +00:00
yar
78326c15fe Add two knobs to ifconfig(8), vlanmtu' and vlanhwtag',
that provide control over the respective capabilities
of an interface, reception of extended frames and hardware
VLAN multiplexor.
2004-07-26 13:25:45 +00:00
suz
1c510b6b70 re-enabled Rev 1.15 (lost during KAME merge at Rev 1.25, due to a KAME bug...)
Obtained from: KAME
2004-07-26 08:18:37 +00:00
phk
0c577f0c87 Give better diagnostic for problems with backing files. 2004-07-25 08:17:23 +00:00
le
fca95b696e Fix potential buffer overflow.
PR:            bin/14697
Submitted by:  Matthew <kienow@infinet.com>
2004-07-24 19:11:40 +00:00
keramida
374897f0eb Add references to pf(4) and pfctl(8) at the description of
securelevel = 3.

PR:		docs/69417
Submitted by:	Janos Mohacsi (mohacsi(at)niif(dot)hu)
2004-07-22 10:38:13 +00:00
andre
695543e4da Extend versrcreach by checking against the rt_flags for RTF_REJECT and
RTF_BLACKHOLE as well.

To quote the submitter:

 The uRPF loose-check implementation by the industry vendors, at least on Cisco
 and possibly Juniper, will fail the check if the route of the source address
 is pointed to Null0 (on Juniper, discard or reject route). What this means is,
 even if uRPF Loose-check finds the route, if the route is pointed to blackhole,
 uRPF loose-check must fail. This allows people to utilize uRPF loose-check mode
 as a pseudo-packet-firewall without using any manual filtering configuration --
 one can simply inject a IGP or BGP prefix with next-hop set to a static route
 that directs to null/discard facility. This results in uRPF Loose-check failing
 on all packets with source addresses that are within the range of the nullroute.

Submitted by:	James Jun <james@towardex.com>
2004-07-21 19:55:14 +00:00
harti
3291a38e2c The media info is printed with the -hardware option so there is no
point to write 'Media' in the table header for the -atm option.
2004-07-21 14:52:21 +00:00
harti
d6d9637484 'atmconfig natm show' shows all currently configured PVCs for IP over ATM,
not 'atmconfig natm list'.
2004-07-21 09:44:27 +00:00
harti
86de02ee1a Add special lines for 'help commands'. 2004-07-21 09:43:31 +00:00
harti
99f064c5b2 Allow more than one help file. There is a restriction that
each help file must start with a level 0 topic.
2004-07-21 09:42:56 +00:00
harti
156a2124eb Allow the help file path and name to be overwritten by cc -D...
Also remove the current directory from the default help file path
and add an appropriate directory in /usr/local instead.
2004-07-21 09:39:53 +00:00
harti
4254b3bd22 The natm sub-command was missing in the TOC of the helpfile. 2004-07-20 16:50:57 +00:00
pjd
67d8cb396e MFp4: Add two options for gnop(8)'s 'create' command:
-o offset - specifies where to start on the original provider
	-s size - specifies size of the transparent provider
2004-07-19 07:52:56 +00:00
silby
b9839954ba Clarify boot.8 (i386 version) a bit, so that people know
where boot.config needs to reside.  Also change /kernel
to /boot/loader, as that is the apparent default now.  This
man page probably requires more updates.
2004-07-18 21:39:45 +00:00
maxim
957eb5835c `off' is a keyword, not a parameter name.
Obtained from:	DragonFly
2004-07-18 09:57:47 +00:00
pjd
dc0d79acb9 MFp4: Add 'dump' command to gconcat(8), glabel(8) and gstripe(8) which allow
to dump metadata from given components.
2004-07-18 08:00:30 +00:00
brueffer
7b7ced8d0f Mention the vfs.usermount sysctl.
Obtained from:	NetBSD via DragonFly BSD
MFC after:	3 days
2004-07-18 01:51:59 +00:00
pjd
84afba7490 Add a reference to glabel(8). 2004-07-14 13:32:00 +00:00
phk
b0e6874188 Give kldunload a -f(orce) argument.
Add a MOD_QUIESCE event for modules.  This should return error (EBUSY)
of the module is in use.

MOD_UNLOAD should now only fail if it is impossible (as opposed to
inconvenient) to unload the module.  Valid reasons are memory references
into the module which cannot be tracked down and eliminated.

When kldunloading, we abandon if MOD_UNLOAD fails, and if -force is
not given, MOD_QUIESCE failing will also prevent the unload.

For backwards compatibility, we treat EOPNOTSUPP from MOD_QUIESCE as
success.

Document that modules should return EOPNOTSUPP for unknown events.
2004-07-13 19:36:59 +00:00
pjd
ec7d60de69 Document sysctl variables.
Based on:	simon's patch
2004-07-13 12:32:20 +00:00
pjd
7e02e14d6d Those sysctl are used to control GEOM class, not a userland utility.
Reviewed by:	simon
2004-07-13 12:30:11 +00:00
pjd
51c2dcdfa6 Document sysctls variables used by GEOM_STRIPE class.
Submitted by:	simon
2004-07-13 11:28:40 +00:00
pjd
2210d0e607 Decrease default stripe size to 4k, as we have "FAST" mode turned on by
default.
2004-07-09 14:41:51 +00:00
trhodes
7e476e89f4 Remove support for gemdos, John removed it from the driver awhile ago.
Glanced at by:	jhb
2004-07-08 18:06:44 +00:00
ru
61c4386adb Slight markup and grammar fixes. 2004-07-07 21:00:57 +00:00
ru
9f45c1d92e mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
ru
f342897042 Removed redundant and unsafe BINDIR redefinition. 2004-07-07 17:33:20 +00:00
pjd
92cb4b0057 Fix copy&paste bug. 2004-07-06 18:18:20 +00:00
stefanf
42232f8162 Parenthesised string literals are invalid in initialisers for character arrays.
Use braces instead.
2004-07-06 17:48:34 +00:00
pjd
7822814115 - Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous.
- Update manual pages and extend examples.
- Bump versions.
2004-07-05 21:16:37 +00:00
pjd
d117b211a3 MFp4: gmirror(8) is coming soon, and we need g_metadata_read() there. 2004-07-05 02:06:44 +00:00
phk
704b01603a Give natd multi-instance capabilities.
This makes it possible to do load-sharing on two xDSL lines etc.
2004-07-04 12:53:54 +00:00
ru
bc58a1e574 One more hard sentence break. 2004-07-03 23:01:44 +00:00
pjd
fba777f30c Grammar nits.
Submitted by:	David Magda <dmagda@ee.ryerson.ca>
2004-07-03 08:36:09 +00:00
ru
d9e4eb9285 Deal with double whitespace. 2004-07-03 00:13:43 +00:00
ru
46fddaa54b Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
pjd
7f4ea6942f Introduce GEOM_LABEL class.
This class is used for detecting volume labels on file systems:
UFS, MSDOSFS (FAT12, FAT16, FAT32) and ISO9660.
It also provide native labelization (there is no need for file system).

g_label_ufs.c is based on geom_vol_ffs from Gordon Tetlow.
g_label_msdos.c and g_label_iso9660.c are probably hacks, I just found
where volume labels are stored and I use those offsets here,
but with this class it should be easy to do it as it should be done by
someone who know how.
Implementing volume labels detection for other file systems also should
be trivial.

New providers are created in those directories:
/dev/ufs/ (UFS1, UFS2)
/dev/msdosfs/ (FAT12, FAT16, FAT32)
/dev/iso9660/ (ISO9660)
/dev/label/ (native labels, configured with glabel(8))

Manual page cleanups and some comments inside were submitted by
Simon L. Nielsen, who was, as always, very helpful. Thanks!
2004-07-02 19:40:36 +00:00
arun
c0b5079fea Bump up the date and add spaces around commas. Thanks to ru@ for noticing. 2004-07-02 18:39:15 +00:00
ru
08228faf09 Deal with harmful leading whitespace. 2004-07-02 18:37:52 +00:00
arun
dce79fc81a Added the ability to create and display Linux/Windows GPT partitions to gpt(8). 2004-07-01 22:27:12 +00:00
imp
3c5c35a72b Create a unix domain socket and write to it all the events that come
in over the socket.
2004-07-01 07:24:18 +00:00
sobomax
8ce714e6e3 o Fix semantics of comparison function for qsort(3). According to qsort(3)
manpage:

     The comparison function must return an integer less than, equal to, or
     greater than zero if the first argument is considered to be respectively
     less than, equal to, or greater than the second.

  Therefore, simply returning "arg1 > arg2" is incorrect. Actually it works
  but for the number of items to be sorted less than 7 due to special case
  handling in qsort(3);

o add missing '\n' to one of usage() calls.

Approved by:	phk
2004-06-25 13:04:49 +00:00
eik
65e528a8ff fix handling of an unknown progeam name
Noticed by:	Joshua Goodall <joshua@roughtrade.net>
Approved by:	ru
2004-06-22 09:18:50 +00:00
pjd
df25a03253 Print mediasize in human readable form as well. 2004-06-21 09:20:06 +00:00
iedowse
516e3c359b Print the `99.99% done, finished soon' message only as often as the
normal status messages. Previously a large number of these new
messages could be spewed out towards the end of a dump.

Reviewed by:	imp
2004-06-19 22:41:18 +00:00
green
0ff326a04e Note that conscontrol set and unset are an interface for TIOCCONS. 2004-06-18 20:06:04 +00:00
joerg
792b42bf42 Fix indentation of continuation lines to (hopefully) comply with
style(9).

Reminded by:	bde
2004-06-18 15:08:08 +00:00
green
0202a06259 Add to conscontrol(8) "set" and "unset" commands which modify the
virtual console set-up.  Specifically, "conscontrol unset" will cause
printf(9) output to start going to the console again.
2004-06-18 06:33:44 +00:00
pjd
74169a273f Add missing newlines. 2004-06-17 06:04:14 +00:00
mlaier
f60cf9b58b Commit userland part of pf version 3.5 from OpenBSD (OPENBSD_3_5_BASE). 2004-06-16 23:39:33 +00:00
pjd
089ffc2ca6 Implement 3 new functions:
- g_lcm() - calculates Least Common Multiple of two given values,
		it is helpful when we need to find sector size for provider
		which is based on disks with different sector size;
	- g_get_mediasize() - returns media size of given provider;
	- g_get_sectorsize() - returns sector size of given provider;
Those function aren't used now, but are used by geom_mirror which will be
committed soon.
2004-06-16 10:44:26 +00:00
bms
5bae048b01 When parsing an argument as an address in getaddr(), heed the -host option
in all cases.  The failure mode in the PR is easily reproducible without
this patch.

PR:		bin/43139
2004-06-16 06:29:41 +00:00
bms
84b5fefda5 Turn on RFC 1724 compliant behaviour with regards to IP_ADD_MEMBERSHIP;
routed should be able to specify multicast memberships to be added by
interface index. This should fix the unnumbered / point-to-point case
for RIPv2.

PR:		bin/51927
Requested by:	Eugene Grosbein
2004-06-16 05:08:57 +00:00
pjd
baa68ba11e Connect geom(8) to the build.
Reminded by:	des
2004-06-15 17:31:35 +00:00
bms
ca5dd87a5d Ignore kernel routes with the RTF_WASCLONED flag set. This is a slight
modification of a patch which was already applied for BSD/OS in the
Rhyolite.com sources; this file is already off the vendor branch.

PR:		bin/57484
Submitted by:	Richard Perini
2004-06-15 00:23:26 +00:00
bms
7f82e9bad3 mdoc(7) police
Submitted by:	ru
2004-06-14 19:31:10 +00:00
bms
c8b9db3b58 Wordsmith the BUGS section re: IPv6 link-local addresses.
PR:		docs/66541
Submitted by:	Michel Lavondes (with some cleanups/additions)
2004-06-14 16:04:59 +00:00
phk
354d52981a Make fdisk initialize the first instead of the last slice by default. 2004-06-14 07:21:19 +00:00
le
74769ce0e6 Add gvinum, the geom_vinum userland tool. 2004-06-12 21:22:47 +00:00
eik
6ce46a0816 Add sha1 and rmd160 checksum tools.
Since the algorithms are already supported in libmd,
the size increase is small when a dynamic root is used.

Approved by:	joerg, ru
MFC after:	2 weeks
2004-06-11 16:07:02 +00:00
joerg
24688fcbd1 Cast the arguments to make_h_number() to uintmax_t before multiplying
them...  Otherwise the result will be truncated anyway.
2004-06-11 11:41:33 +00:00
ru
08b51f3241 Fixed a bug spotted by compiling with -Wall. 2004-06-10 07:51:11 +00:00
ru
27bed143c8 Introduce a new feature to IPFW2: lookup tables. These are useful
for handling large sparse address sets.  Initial implementation by
Vsevolod Lobko <seva@ip.net.ua>, refined by me.

MFC after:	1 week
2004-06-09 20:10:38 +00:00
ru
e42a7fd928 Reapply traditionally lost fixes, fixed some more.
This manpage needs an English clenup.
2004-06-05 20:22:15 +00:00
stefanf
2e7a36072a Typedefing an array of incomplete structs is non-standard C code.
Approved by:	das (mentor)
2004-06-02 23:02:31 +00:00
pjd
f53d93d179 Remove extra semicolon.
Inspired by:	fjoe
2004-06-02 21:21:10 +00:00
csjp
77c46c25ea o Move NEED1 macro to the top of the source file.
o Add sanity checking to the firewall delete operation
  which tells the user that a firewall rule
  specification is required.

The previous behaviour was to exit without reporting any
errors to the user.

Approved by:	bmilekic (mentor)
2004-06-02 21:12:55 +00:00
joerg
47c3b63625 ru's mdoc(7) style police was here.
Submitted by:	ru
2004-06-02 20:21:28 +00:00
joerg
3c677f61f4 Major overhaul of sunlabel(8).
. Implement option -c, all partition sizes will be calculated
  in cylinders as opposed to sectors.  Since the Sun label is
  inherently cylinder-based, this makes the job a little easier.

. Implement option -h, print the label in `human readable'
  size/offset format.

. Implement SVR4-compatible VTOC-style elements.  They are
  fully optional, defaulting to the current behaviour where no
  VTOC-style table will be written to disk.  However, if
  desired, the full functionality of the partitioning menu of
  Solaris' format(1m) is now offered (and even more).

. When editing the label, do not loop around edit_label() where
  a new template file is generated for each turn, this used to
  be annoying in that any possible syntax error caused a
  complaint, but then the template was created anew, so the
  user had to perform all their editing again.  Rather loop
  inside edit_label(), similar to bsdlabel(8), so in case of
  errors, the user will be presented their previous template
  file again.

. If VTOC-style elements are present, the overlap checks are
  made less stringent.  Overlaps will still be warned about,
  but overlaps of `unmountable' partitions against other ones
  are no longer fatal.  That way, e. g. VxVM encapsulated
  disk labels can be fully edited in FreeBSD (but not in
  Solaris ;-).

. In print_label(), generate the editing hints only if the -e
  flag is in effect.  Additionally, print a hint about the
  total number of sectors in the (hardware) medium.

. When editing a label, allow for changing the geometry
  emulation (and textual name) by modifying the "text:" line
  on top.  That way, a more effective emulation can be
  chosen.

. When editing/reading a label, additionally allow for the
  suffixes `s' (512-byte sectors), and `c' (cylinders) in the
  partition size field.

. Finally, turn the stub man page into something that really
  explains the entire thing.
2004-06-01 20:32:36 +00:00
le
6428c20edb Fix typo. 2004-05-30 17:40:39 +00:00
dwmalone
6671fde294 Use a better way to calculate POINTER_WIDTH suggested by pjd@. 2004-05-30 10:10:41 +00:00
dwmalone
49950e70c8 Decide how much space we need to print a pointer using
sizeof(void *) rather than if __alpha__ is defined.
2004-05-28 21:16:44 +00:00
pjd
a040fe460a Fix order. 2004-05-26 17:51:53 +00:00
pjd
069fe3e9ef Print provider's size in human-readable form as well. 2004-05-26 11:08:35 +00:00
le
ad65278a44 'ld' lists drives, not volumes. 2004-05-25 20:08:50 +00:00
pjd
5388d45e09 - Add a cross-reference to geom(8).
- Add missing 'a'.
2004-05-24 23:05:21 +00:00
pjd
9dfa070a47 Add manual page for geom(8) utility.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-24 23:03:29 +00:00
stefanf
5857c0ba2a Use the correct types for the functions rst_opendir(), glob_readdir() and
rst_closedir() which are called by glob().

Reviewed by:	md5
Approved by:	das (mentor)
2004-05-24 16:24:26 +00:00
stefanf
2edc0418f9 Include <timeconv.h> for time conversion functions.
Approved by:	das (mentor)
2004-05-24 16:10:57 +00:00
stefanf
f88a9f423c Include <sys/linker.h> for kldload().
Approved by:	das (mentor)
2004-05-24 13:39:06 +00:00
maxim
2b2f469df0 o Fix usage example.
PR:		docs/67065
Submitted by:	David Syphers
2004-05-23 19:05:59 +00:00
brueffer
6c819c3288 Fix typo
Submitted by:	edwin
2004-05-23 08:40:52 +00:00
pjd
b0a9931e9a Add standard command "help" to print usage. 2004-05-22 16:57:39 +00:00
pjd
ef31e6c3b5 Actually we are also able to list only choosen providers. 2004-05-22 16:17:57 +00:00
pjd
c75ca6dc1d Be more precise. 2004-05-22 10:53:06 +00:00
pjd
8ed5f6a137 style.Makefile(5). 2004-05-22 10:33:18 +00:00
pjd
50df38a36c Remove gconcat(8) utility. It was replaced by geom(8). 2004-05-21 22:38:49 +00:00
pjd
f1f2f04c6e - More clear example description.
- Fix copy&paste bug.
2004-05-21 22:35:18 +00:00
pjd
79048abe02 Add manual pages for gconcat(8), gstripe(8) and gnop(8) utilities.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-21 22:12:24 +00:00
imp
00e1e7a066 Enter the 1990's and assume that the computer knows what time it is.
Print the ETA of dump being finished, rather than a cryptic delta
time.  Also, if we have written more blocks than the tapesize, assume
that we are 99.99% done and that we'll be finished 'soon'.
2004-05-21 20:13:33 +00:00
pjd
b400b04c05 - Change command name from 'config' to 'configure'.
- Bump version number.
2004-05-21 15:23:48 +00:00
pjd
ccdf5be9ce Various style.Makefile(5) improvements.
Inspired by:	ru
2004-05-20 20:12:17 +00:00
pjd
ad72c978da Various style.Makefile(5) improvements.
Provoked by:	ru
2004-05-20 20:05:05 +00:00
ru
fb7ca181a0 Clean up language.
Reviewed by:	rik
2004-05-20 16:40:06 +00:00
des
9d30610b24 Whitespace cleanup. 2004-05-20 15:01:26 +00:00
pjd
8bae9ba9b3 Fix supposed compilation problem, using LIBDIR here can confuse core/
compilation.
2004-05-20 14:59:41 +00:00
pjd
3e714a6487 - Connect geom(8) and its libraries to the build.
- Connect geom_stripe and geom_nop modules to the build.
- Connect STRIPE and NOP classes to the LINT build.
- Disconnect gconcat(8) from the build.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:37:13 +00:00
pjd
2d3c7f90d7 Introduce geom(8)-specific shared libraries for CONCAT, STRIPE and NOP
GEOM classes. CONCAT should be 100% compatible with existing gconcat(8)
utility, which is going to be removed.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:24:23 +00:00
pjd
b6dce981e7 Bring in geom(8) utility. It is an universal utility for operating on
GEOM classes. It works by loading a shared library via dlopen(3) mechanism
with class-specific code, it is also responsible for communicating with
GEOM via libgeom(3).
Per-class shared libraries are going to be stored in /lib/geom/ directory.
It provides also few standard commands like 'list', 'load' and 'unload'
for existing classes which aren't aware of geom(8).
More info will be send on freebsd-current@ mailing list.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:09:56 +00:00
scottl
fe4d2929f5 Improve the delay algorithm used in bgfsck. From the author:
shuffles the timing and sleep calls in bgfsck from:

 sleep timer_on io timer_off io io io io io io io
   to
 sleep io io io io io io io timer_on io timer_off

 The original method basically guaranteed that the timed I/O included a
 disk seek every time, which made bgfsck sleep for much longer than
 necessary.

Submitted by:   Dan Nelson
Reviewed by:    kirk
2004-05-18 19:51:41 +00:00
stefanf
5aa1920310 Remove spurious semicolons.
Approved by:	das (mentor)
Reviewed by:	ipfw@
2004-05-18 13:57:37 +00:00
ru
4e45410d6e Markup overhaul. 2004-05-18 07:23:37 +00:00
ru
479e3fd631 Markup nits. 2004-05-17 21:24:06 +00:00
ru
5299a4a0f7 Correct existing usage lines, add two more. 2004-05-17 21:11:35 +00:00
ru
72b515d266 Markup nits. 2004-05-17 21:05:39 +00:00
ru
d93de8e986 Markup and grammar nits. 2004-05-17 20:58:42 +00:00
ru
826e635fc0 Markup overhaul. 2004-05-17 20:45:21 +00:00
ru
f6aa4621fd Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
ru
d268c01ce2 Reapply local changes that got simply axed by the latest KAME merge.
Fixed some more markup.
2004-05-17 08:25:15 +00:00
ru
9c53502419 Added -l to usage(). 2004-05-17 07:07:20 +00:00
cognet
797424d85b Use WARNS?=3 for these in the arm case for now, due to toolchain issues. 2004-05-14 13:31:21 +00:00
ume
e439e07721 check if the null encryption is supported or not.
Requested by:	bms
Obtained from:	KAME
2004-05-13 15:46:28 +00:00
ru
ddc2fcfc4f Polish the mdoc(7) markup. 2004-05-12 07:34:05 +00:00
hmp
b8388ce606 Use strlcpy(3) instead of strcpy(3).
PR:          	46761

Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2004-05-10 22:33:12 +00:00
csjp
02de288baa Remove redundant sanity check before add_mac() when adding
mac ipfw rules. The exact same sanity check is performed as
the first operation of add_mac(), so there is no sense
in doing it twice.

Approved by:	bmilekic (mentor)
PR:		bin/55981
2004-05-09 01:53:31 +00:00
csjp
60a433f4c8 Teach route(8) how to deal with root being in a prison. If prison
root is allowed to create raw sockets, then they will be able to create
routing sockets, too.  However prison-root is not able to manipulate
routing tables.  So when route(8) attempts to write to a routing
socket and recieves EPERM from the kernel, exit rather than moving
on with execution.

Approved by:    bmilekic (mentor)
2004-05-07 15:33:17 +00:00
joerg
cfc5073355 When editing a Sun label, make the search for a valid partition line
violate POLA a little less by not requiring exactly two spaces in front
of the entry (and silently discarding any non-matching entry).  We now
recognize anything starting with a letter followed by a colon as the
first non-space chars as a partition entry.
2004-05-04 09:50:41 +00:00
bde
fff477ffd4 Include <sys/time.h> for the declaration of struct bintime instead of
depending on namespace pollution in <sys/stat.h>.  struct bintime is
only needed to satisfy leakage of kernel interfaces to userland and
namespace bugs in those interfaces...
2004-05-04 07:08:04 +00:00
pjd
8e85a8db26 Add missing command. 2004-05-03 21:31:19 +00:00
pjd
c1a10eac03 Add missing commands. 2004-05-03 21:29:22 +00:00
pjd
364696c35d Connect ggatec(8), ggated(8) and ggatel(8) to the build. 2004-05-03 21:14:03 +00:00
pjd
9a8678bb77 Don't repeat handshake.
This little thing can cause a deadlock, because taste mechanism start
to work after creation of ggate provider and I/O requests are sent from
other classes from the g_event thread, so number of pending events isn't 0.
Now ggatec(8) start second handshake and ggated(8) is trying to open
GEOM provider (for example md(4)) and it can't, because it hangs on
g_waitidle() in g_dev_open(). g_waitidle() cannot finish because
there is a pending read on event queue, and this read can't be
finished, because ggated(8) can't open target device.
GEOM Gate will recover from this deadlock, because requests will
timeout, but it of course isn't the best solution and I don't know
better one for now, so we should avoid opening GEOM providers while
there are pending requests in event queue.
2004-05-03 18:24:41 +00:00
andre
5ecba3f8bc Link state change notification of ethernet media to the routing socket.
o Print the link state for interface messages in monitor mode.

No objections by:	sam, wpaul, ru, bms
Brucification by:	bde
2004-05-03 16:30:32 +00:00
pjd
ffd473d54b Paths correction.
Pointed out by:	ache, make buildworld
2004-05-03 07:21:59 +00:00
pjd
7e21b7fd59 We don't need this any more, while we have /usr/include/geom/concat/. 2004-05-03 07:20:27 +00:00
pjd
1867695ee6 Fix compiling on 64-bit architectures. 2004-05-02 17:59:49 +00:00
marcel
7e187e2ba9 Build gpt(8) on all platforms, except sparc64. Currently gpt(8) is
not endian agnostic and thus will create big-endian GPTs on sparc64.
This we don't support. So, before gpt(8) can be used on a big-endian
machine, it has to deal with the endianness.
2004-05-01 18:17:23 +00:00
ambrisko
8abe6632d3 For both ifconfig and route if we didn't get enough memory from the
prior sysctl due to the structure growing between calls try again.

Also try again for deleting routes if things fail.  We've seen
route -f fail this way which does not actually flush all routes.
This fixes it.  It will whine but it will do the work.

PR:		56732
Obtained from:	IronPort
2004-04-30 22:34:12 +00:00
pjd
71ff258eed GEOM Gate network daemon. 2004-04-30 16:19:50 +00:00
pjd
68969eb22f GEOM Gate network client and control utility. 2004-04-30 16:18:01 +00:00
pjd
bbe94a6e43 GEOM Gate local control utility. 2004-04-30 16:15:13 +00:00
pjd
b0399e5dba Stuff shared between ggate utilities. 2004-04-30 16:13:45 +00:00
pjd
dbf20e6f7f Makefile for building ggate utilities: ggatel(8), ggatec(8), ggated(8). 2004-04-30 16:12:20 +00:00
ghelmer
3739062957 Invoke tzset(3) within the main loop to catch changes to /etc/localtime
when running as a daemon in the hope that it will fix situations
where the CMOS clock was apparently set using the stale TZ offset.
2004-04-27 14:43:03 +00:00
bmilekic
788a94ec83 The previous change to mount(8) to report ufs or ufs2 used
libufs, which only works for Charlie root.

This change reverts the introduction of libufs and moves the
check into the kernel.  Since the f_fstypename is the same
for both ufs and ufs2, we check fs_magic for presence of
ufs2 and copy "ufs2" explicitly instead.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
2004-04-26 15:13:46 +00:00
andre
d4f49f008f Add the option versrcreach to verify that a valid route to the
source address of a packet exists in the routing table.  The
default route is ignored because it would match everything and
render the check pointless.

This option is very useful for routers with a complete view of
the Internet (BGP) in the routing table to reject packets with
spoofed or unrouteable source addresses.

Example:

 ipfw add 1000 deny ip from any to any not versrcreach

also known in Cisco-speak as:

  ip verify unicast source reachable-via any

Reviewed by:	luigi
2004-04-23 14:28:38 +00:00
tjr
86f07d4f93 Only compare the interesting part of the bootblock with its backup.
Allow check to proceed with bad backup boot block if we're doing a
readonly check. Various typos in comments.

Obtained from:	NetBSD
2004-04-20 11:41:57 +00:00
rees
cc363f9f35 use %zu instead of %zd
Requested by:	Bruce Evans
2004-04-15 16:12:12 +00:00
luigi
ce58934c26 Replace ROUNDUP/ADVANCE with SA_SIZE 2004-04-13 11:24:43 +00:00
green
581462d465 Add -P arguments for dump(8) and restore(8) which allow the user to
use backup methods other than files and tapes.  The -P argument is
a normal sh(1) pipeline with either $DUMP_VOLUME or $RESTORE_VOLUME
defined in the environment, respectively.

For example, I can back up my home to three DVD+R[W]s as so:
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s2e  40028550 10093140 26733126    27%    /home
green# dump -0 -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /home
2004-04-13 02:58:06 +00:00
green
92223ccc32 Improve the warnings for dump -L and do not bother doing the snapshot if
it is specified for read-only filesystems.

Submitted by:   Jason Young <jyoung8607@hotmail.com>
PR:     46672
2004-04-12 20:19:32 +00:00
ru
04fb5a0de8 Document that -m also causes the capability list to be displayed. 2004-04-11 13:44:57 +00:00
ru
dd9ed98446 Added the new interface capability option for drivers that implement
user-configurable polling(4) support.  Make ifconfig(8) aware of it.

Suggested by:	luigi
2004-04-11 13:36:52 +00:00
bde
5a496233ec Fixed unformatting of copyright clause 4 in previous commit. 2004-04-10 02:22:35 +00:00
markm
90f91e7879 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
maxim
7c2d493645 o Fix an incorrect parsing of 0.0.0.0/0 expression.
PR:		kern/64778
MFC after:	6 weeks
2004-04-09 17:26:01 +00:00
iedowse
e5237a493b Don't turn off the regular SIGINFO status information. The use of
the NOKERNINFO flag only marginally de-clutters the output and
has a number of unwanted side effects:
  o The kernel info might be what you want to see
  o ^T is left non-functional if ping is killed non-cleanly
  o "ping -q foo &" gets suspended on tty output

Encouraged by:	bde
2004-04-07 18:48:11 +00:00
pjd
28ff3ddda6 Add a workaround.
Now, if we have for example: ad0s1 ad0s1c ad2s1 ad2s1c and we will try
to do: gconcat label foo /dev/ad0s1 /dev/ad2s1 we'll get a panic:
panic: spoiled but dcr = 1
for inside of geom_slice class, backtrace shows:
g_access()
g_slice_access()
g_access()
g_concat_read_metadata()
We need to get a proper fix for this race before geom(8) will be committed.
2004-04-04 13:32:00 +00:00
phk
206a45d61b Fix an off-by-one error in the function used to input the ascii/hex strings.
Be a little bit more helpful in error messages.
2004-04-04 07:28:58 +00:00
bde
c807fa08f5 Include <time.h> instead of depending on namespace pollution in <sys/stat.h>
for the declaration of time().
2004-04-04 04:17:07 +00:00
mux
a69a7e8d18 It seems growfs(8) is now WARNS?=6 safe.
Tested on:	alpha, i386, ia64, sparc64
2004-04-03 23:56:24 +00:00
mux
3ceb770141 Fix the remaining warnings of growfs(8) on my sparc64 box with
WARNS=6.  I don't change the WARNS level in the Makefile because I
didn't tested this on other archs.

The fs.h fix was suggested by:	marcel
Reviewed by:	md5(1)
2004-04-03 23:30:59 +00:00
mux
6ecbf96a8e - Don't abuse caddr_t when what we really want is a void *.
- Use the %jd format and a cast to intmax_t to print an int64_t.
- The return type of getopt() is an int, not a char.

This fixes some warnings but there's still much more work to do here.
2004-04-03 22:56:54 +00:00
le
7ffed5b360 Temporarily go back to WARNS=0 until I can figure out what's breaking
the {powerpc, sparc64, ia64} tinderboxes.

Sorry for the noise. :-(
2004-04-03 22:26:43 +00:00
le
9b622e32d9 Make growfs WARNS=6 clean.
Approved by:	grog (mentor)
2004-04-03 17:40:19 +00:00
johan
30a416556d Remove these MAINTAINER lines since the maintainers has had their
commit bits retired for safe keeping.
2004-04-01 20:31:49 +00:00
bms
37a21337e3 Fix regression in setkey whereby parser would fail to recognise tcp as
both a security protocol and an upper level protocol for encapsulation.

PR:		bin/63616
Submitted by:	ume@
2004-03-31 18:38:02 +00:00
luigi
7d2b7cf0e9 Implement a '-f' flag to teach bsdlabel to work on files instead of
disk partitions.
2004-03-30 23:15:03 +00:00
sam
0242ed134b add support for setting 802.11 rtsthreshold, transmit power,
and 11g protection mode

Reviewed by:	imp (just code)
2004-03-30 22:59:22 +00:00
dwmalone
8432facd78 Remove a stray \n from a setproctitle.
Submitted by:	Niki Denev <nike_d@cytexbg.com>
2004-03-30 20:01:25 +00:00
ceri
77f01944ce Backout revision 1.140; it seems that the previous version is clear
enough.

Requested by:	ru
2004-03-27 14:13:53 +00:00
le
8deb46de83 Don't read an inode which isn't used to avoid problems on UFS2 where not
all inodes are initialized when running newfs.

Approved by:    grog (mentor)
2004-03-26 23:42:32 +00:00
rees
d5e8f62700 fix for 64-bit arch:
use %zd to print size_t types and sizeof()

Approved by:	alfred
Tested on:	sparc64, amd64
2004-03-26 22:44:59 +00:00
maxim
b44c8fb7c5 o The lenght of the port list is limited to 30 entries in ipfw2 not to 15.
PR:		docs/64534
Submitted by:	Dmitry Cherkasov
MFC after:	1 week
2004-03-26 19:09:22 +00:00
bde
f32b255d3a Fixed some style bugs in the residue of rev.1.14 (mainly initialization in
declarations, uncuddled elses and excessive braces).
2004-03-26 16:11:13 +00:00
ru
74e1fa6daf Not too much point specifying -N but not specifying -M. 2004-03-26 09:24:45 +00:00
bde
1c06796286 Fixed some style bugs in or related to rev.1.13 (mainly misindentation of
the getopt() case statement).
2004-03-26 08:39:36 +00:00
rwatson
b7e237c3e1 Correct the definition of the multilabel flag: it enables multilabel
MAC support on the file system, if supported, which causes MAC to treat
each object as having its own label, rather than using a single label
for all objects on the file system.  This doesn't have to be used in
combination with the tunefs/newfs flags -- it's an alternative.
2004-03-26 03:26:15 +00:00
cperciva
6ebcbbb486 Final step of the sbin -> usr.sbin move: cvs rm src/sbin/nologin/*
I meant to do this a week ago, but I forgot.
2004-03-25 14:53:53 +00:00
ceri
4eac8b9f7d Clarify the description of the "established" option.
PR:		docs/50391
Submitted by:	root@edcsm.jussieu.fr
MFC after:	1 week
2004-03-22 21:24:38 +00:00
obrien
1741d64025 Share the i386 boot manual page. 2004-03-22 00:52:27 +00:00
peter
ccd389b7a3 Add initial support for compiling a special 32 bit version of
ld-elf.so.1 on 64 bit systems.  Most of this involves using alternate
paths, environment variables and diagnostic messages.

The build glue is seperate.
2004-03-21 01:21:26 +00:00
ru
11511b476d NULL -> 0. 2004-03-17 20:50:25 +00:00
scottl
57374797f1 Remove the RAIDframe userland tool. 2004-03-16 12:28:40 +00:00
jhb
5670428480 When installing boot blocks into an Alpha BSD label, setup the location,
length, and flags fields at the end of the SRM boot sector so that SRM can
find the bootstrap code.  This fixes bsdlabel -m alpha to generate bootable
disklabels.

Reviewed by:	phk
2004-03-15 23:10:34 +00:00
sos
127008a266 Add printing of relevant SATA info where approbiate. 2004-03-15 13:21:41 +00:00
jmallett
c228ea938a Validate argument to -i. 2004-03-15 03:41:07 +00:00
cperciva
c990ac0757 Don peril-sensitive glasses and throw the switch to move nologin(8) from
/sbin to /usr/sbin.  A symlink from /sbin/nologin -> /usr/sbin/nologin
is created for compatibility purposes.

This will probably not cause any problems, but anyone who is doing
anything particularly unusual with nologin(8) or shells in general might
be well advised to check that everything still works.

Bikesheds on:	cvs-all, current
2004-03-13 11:02:37 +00:00
cperciva
e1627f9ca5 Fix 10 year old size-of-bcopy bug.
PR:		bin/43930
Submitted by:	Alan Barrett
Approved by:	rwatson (mentor)
MFNetBSD:	revision 1.35
MFC after:	3 days
2004-03-13 00:11:05 +00:00
ru
f2b9d84260 The print mask's first part is the base, not the total number of bit
identifiers.
2004-03-12 23:52:32 +00:00
ru
1579b4cc4f Show the polling(4) flag on the interface. 2004-03-12 23:43:40 +00:00
bde
be31ea68bb Fixed mispellings of '\0' as NULL. 2004-03-11 11:41:54 +00:00
bde
1b963c9bef Fixed misspellings of 0 as NULL. 2004-03-11 10:01:12 +00:00
phk
0f56e66e2f Fix a long-standing deadlock issue with vnode backed md(4) devices:
On vnode backed md(4) devices over a certain, currently undetermined
size relative to the buffer cache our "lemming-syncer" can provoke
a buffer starvation which puts the md thread to sleep on wdrain.

This generally tends to grind the entire system to a stop because the
event that is supposed to wake up the thread will not happen until a fair
bit of the piled up I/O requests in the system finish, and since a lot
of those are on a md(4) vnode backed device which is currently waiting
on wdrain until a fair amount of the piled up ... you get the picture.

The cure is to issue all VOP_WRITES on the vnode backing the device
with IO_SYNC.

In addition to more closely emulating a real disk device with a
non-lying write-cache, this makes the writes exempt from rate-limited
(there to avoid starving the buffer cache) and consequently prevents
the deadlock.

Unfortunately performance takes a hit.

Add "async" option to give people who know what they are doing the
old behaviour.
2004-03-10 20:41:09 +00:00
bde
7432091236 Fixed a misspelling of 0 as NULL. 2004-03-10 08:46:39 +00:00
jhb
01eed200f9 Make libgeom usable by C++ programs:
- Add DECL wrappers to libgeom.h.
- Rename structure members in libgeom.h to use a lg_ prefix for member
  names.  This is required because a few structures had members named
  'class' which made g++ very unhappy.
- Catch gstat(8) and gconcat(8) up to these API changes.

Reviewed by:	phk
2004-03-09 21:14:18 +00:00
mlaier
6be47b725d Link pf to the build and install:
This adds the former ports registered groups: proxy and authpf as well as
the proxy user. Make sure to run mergemaster -p in oder to complete make
installworld without errors.

This also provides the passive OS fingerprints from OpenBSD (pf.os) and an
example pf.conf.

For those who want to go without pf; it provides a NO_PF knob to make.conf.

__FreeBSD_version will be bumped soon to reflect this and to be able to
change ports accordingly.

Approved by:	bms(mentor)
2004-03-08 22:03:29 +00:00
markm
0b0ae8e16e Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
brueffer
ccdcd4491d s/considred/considered/ 2004-03-04 00:52:16 +00:00
johan
eda438f852 Make this WARNS=2 clean by:
- including <timeconv.h> to get _long_to_time prototype
	- removing an unused variable

Bump WARNS to it keep clean.

Approved by:	ume on ipfw@
2004-03-03 20:21:15 +00:00
ken
ad706f7e3d Fix a couple of camcontrol issues that popped up on sparc64:
- bzero the CCB header in getdevtree() and set the path properly, to
   avoid having random garbage in the CCB header.
 - if the lun isn't specified in a device specifier, it should default to
   0, not whatever random data happens to be in the lun variable.
 - move the prototype for getdevtree() out from under #ifndef MINIMALISTIC,
   since it is used in both cases.

Submitted by:	Marius Strobl <marius@alchemy.franken.de> (mostly)
MFC After:	2 weeks
2004-03-03 01:51:24 +00:00
dd
ae9f26fffc Add CTLTYPE_QUAD to the list of types for which we don't want an empty
value.  All the other numeric types are doing it . . .
2004-03-02 05:42:52 +00:00
mlaier
54bb06645b Add skeleton build dirs for pf userland:
libexec/ftp-proxy	- ftp proxy for pf
 sbin/pfctl		- equivalent to sbin/ipf
 sbin/pflogd		- deamon logging packets via if_pflog in pcap format
 usr.sbin/authpf	- authentification shell to modify pf rulesets

Bring along some altq headers used to satisfy pfctl/authpf compile. This
helps to keep the diff down and will make it easy to have a altq-patchset
use the full powers of pf.

Also make sure that the pf headers are installed.

This does not link anything to the build. There will be a NO_PF switch for
make.conf once pf userland is linked.

Approved by:	bms(mentor)
2004-02-28 21:50:50 +00:00
maxim
c842ac8be9 o Remove obsoleted '-N' and '-d' flags. 2004-02-28 10:42:27 +00:00
maxim
ea5698cae7 o Sync usage() with reality: add 'z' flag.
MFC after:	1 week
2004-02-28 10:22:17 +00:00
scottl
d9a0004b62 In the case of a background fsck, periodically update the process title
with a progress update.
2004-02-28 07:50:42 +00:00
kan
75985f5938 Look for both name and if_<name> strings in module metadata. Pseudo-devices
like tun are naming their modules using the 'if_; prefix and previous version of
the code failed to detect their presence in the kernel, resulting in the same
module being loaded twice.
2004-02-27 06:43:14 +00:00
rwatson
2a43e75b09 Add a "-l" parameter to mdmfs so that memory file systems can be
created with the multilabel flag from inception.  This simply
passes the "-l" flag on to newfs(8).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 01:15:47 +00:00
rwatson
f0df387d84 Add a "-l" flag to newfs, which sets the FS_MULTILABEL flag. This
permits users of newfs to set the multilabel flag on UFS1 and UFS2
file systems from inception without using tunefs.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 01:14:27 +00:00
bms
d21d623f8e Sync HEAD sources to vendor branch import of routed v2.27 from rhyolite.com.
Update <protocols/routed.h> for the MD5 changes requested in bin/35843.
Preserve local changes.

Education by:	obrien, markm, pointy-stick
PR:		bin/35843 (and doubtless others)
2004-02-25 23:45:57 +00:00
bde
1c1e2e0d79 Fixed missing libraries. This unbreaks the -DNO_DYNAMIC_ROOT and
-DNOSHARED=yes cases.
2004-02-24 03:46:12 +00:00
johan
31854a224a style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
pjd
ccf29051b1 Connect gconcat(8) to the build.
Approved by:	scottl (mentor)
2004-02-23 20:06:56 +00:00
pjd
7da34efb47 - Connect manual page for gconcat utility to the build.
- Fix usage.

Approved by:	scottl (mentor) (implicity)
2004-02-23 20:06:21 +00:00
pjd
7918b291da Added manual page for gconcat utility.
Approved by:	scottl (mentor) (implicity)
Reviewed by:	simon
2004-02-23 12:44:08 +00:00
cperciva
fb7918f5d7 Report login attempts to syslog. Due to the statically-linked nature of
nologin(8), this causes a considerable (100K) increase in the binary size,
so I've added a NO_LOGIN_LOG option which disables this.

While I'm here, s/sizeof(MESSAGE)/sizeof(MESSAGE) - 1/, in order to
avoid writing the string-terminating zero byte.

No complaints from: -current
Approved by:	rwatson (mentor)
2004-02-22 10:03:24 +00:00
rees
d68e8ba04c change baduser and badgroup from -2 to 65534, 65533
these should probably be looked up instead, but this is better than before
also minor format changes for style(9)
2004-02-21 21:02:59 +00:00
yar
44ed42c915 We can cross-reference to vlan(4) as long as
the corresponding manpage has been committed.
The rest of "vlan" words, which are refering
to the technology itself, should be capitalized.

MFC after:	1 week
2004-02-21 14:21:18 +00:00
yar
2fbac50c91 The hardware tagging capability is set on the physical
interface that is parent to a vlan(4) interface,
not on the vlan(4) interface itself.
2004-02-21 14:11:57 +00:00
mux
14d69ee306 Mention that securelevel 1 also blocks access to /dev/io if it
exists (not all platforms have it).
2004-02-20 21:38:23 +00:00
tjr
7d791a5bef Merge from RELENG_4 1.28.2.13: Fix saving system crash dumps larger than
2 GB by using fseeko() instead of fseek().
2004-02-20 12:22:52 +00:00
phk
35bd1c71de s/bytes/byte/ 2004-02-19 19:53:07 +00:00
pjd
e035c01b86 Add control utility for disk concatenation (GEOM_CONCAT class).
Reviewed by:	phk, scottl
Approved by:	scottl (mentor)
2004-02-19 16:02:08 +00:00
dwmalone
4a80a9f041 Add a -n option that stops ip6fw making any changes to the rules
in the kernel.

Submitted by:	Orla McGann <orly@redbrick.dcu.ie>
MFC after:	3 weeks
2004-02-18 15:56:53 +00:00
rees
9a383d1448 remove dead code
Approved by:	alfred
2004-02-17 22:28:26 +00:00
grog
55590093d9 Report the difference between ufs and ufs2.
Submitted by:	"Christian S.J. Peron" <maneo@bsdpro.com>
2004-02-17 08:43:05 +00:00
grog
d2b4a8b498 Explain what console names are valid. 2004-02-17 04:53:47 +00:00
grog
431761e4b8 Recognize if the user supplies the full pathname to /dev/console and friends,
and DTRT.

Explain if he supplies a pathname that is not in /dev.
2004-02-17 04:51:06 +00:00
tjr
6ddcc8e1b3 Remove unnecessary newlines from errx() arguments. 2004-02-17 02:02:18 +00:00
le
3865a73090 Also remove "makedev" from the online help. 2004-02-16 23:04:52 +00:00
le
3d4d791def Since DEVFS is mandatory, remove all instances to make_dev*. Keep the
"makedev" command for backwards compatibility, but just print out an
informational message (this was the current behaviour, anyway) and remove
it from the documentation.

Approved by:     grog (mentor)
2004-02-16 09:23:59 +00:00
bde
e85c2c0c75 Support mounting ext2fs file systems with -async to the small extent
that ext2fs in the kernel supports async mounts.  ext2fs used to
effectively force the -async flag on.  -async for ext2fs only gives
async (more precisely, delayed) writes for inode updates, so it is
barely worth using even when it is safe.
2004-02-15 06:31:26 +00:00
le
54a86bd2b3 Remove unused variable and related bogus checks.
Approved by:    grog (mentor)
2004-02-14 01:13:41 +00:00
bms
9ce9891eda Initial import of RFC 2385 (TCP-MD5) digest support.
This is the second of two commits; bring in the userland support to finish.

Teach libipsec and setkey about the tcp-md5 class of security associations,
thus allowing administrators to add per-host keys to the SADB for use by
the tcpsignature_compute() function.

Document that a single SPI must be used until such time as the code which
adds support to the SPD to specify flows for tcp-md5 treatment is suitable
for production.

Sponsored by:	sentex.net
2004-02-11 04:34:34 +00:00
cperciva
788d9119de style cleanup: Remove duplicate $FreeBSD$ tags.
These files had tags after the copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).

Approved by:	rwatson (mentor)
2004-02-10 20:48:08 +00:00
cperciva
d3296afe56 style cleanup: Remove duplicate $FreeBSD$ tags.
These files had tags at the start of the file
(incorrect, removed), and after the copyright
notices (correct).

Approved by:	rwatson (mentor)
2004-02-10 20:40:17 +00:00
trhodes
f4961068e0 Reorder Xrefs in SEE ALSO. 2004-02-10 06:44:41 +00:00
trhodes
0b5bed49c2 Update to inform users of acls and multilabel options. Add Xrefs to the
more relevant manual pages.

PR:		62394
Submitted by:	Marc Silver <marcs@draenor.org>
2004-02-10 06:33:29 +00:00
iedowse
5d8376d847 Further simplify the code for printing the message buffer:
- Ensure that the buffer ends with "\n\0" to avoid special cases
   and allow the use of strtol().
 - Use strvisx() on each complete line instead of character by
   character.

Submitted by:	bde
MFC after:	1 week
2004-02-08 23:08:53 +00:00
iedowse
05e08e2967 Certain ICMP error replies cause ping to perform a reverse DNS
lookup on an IP address from the packet (such as the IP that sent
a TTL exceeded error). If the DNS lookup takes a long time, ^C will
appear to be ineffective since the SIGINT handler just sets a flag
and returns. Work around this by exiting immediately on receipt of
a second SIGINT when DNS lookups are enabled.

PR:		bin/4696
MFC after:	1 week
2004-02-08 21:59:17 +00:00
phk
6c8d799cb9 Fix the last and most important bit of the test case to test the same
binary as the rest of it.

Add MD5 check that the md(4) device gets set up correctly.
2004-02-07 22:58:39 +00:00
le
1d9e83eca3 Correct order of arguments given to checkparity and rebuildparity.
Approved by: joerg (mentor)
2004-02-06 21:07:17 +00:00
ru
743cc6d002 Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
iedowse
71d09d9016 Don't print the oldest line in the message buffer if the buffer is
full, since that line is almost always incomplete. Make the parsing
of <%d> lines more strict.

Also simplify the logic a little:
 - Start off by making the buffer linear so that we don't have to
   deal with it wrapping around (suggested by bde).
 - Process line by line rather than byte at a time.
2004-02-05 21:07:50 +00:00
bde
080a321e4a Fixed operation of -f to match its documentation and fsck_ffs. It
has now has no effect except in combination with -p, and plain fsck
checks all file systems instead of skipping clean ones for msdosfs
only.

Renamed the force flag to skipclean and inverted its logic as in
fsck_ffs.
2004-02-05 15:47:46 +00:00
bde
9cf605d618 Fixed some bugs in checkdirty(). The check for the clean bit was
combined with the the signature check in a wrong way (basically
(dirty:= signature_recognised() && !clean) instead of
(mightbedirty:= !signature_recognized || !clean), so file systems
with unrecognized signatures were considered clean.  Many of the
don't-care and reserved bits were not ignored, so some file systems
with valid signatures were unrecognized.  One of my FAT32 file systems
has a signature of f8,ff,ff,ff,ff,ff,ff,f7 when dirty, but only
f8,ff,ff,0f,ff,ff,ff,07 was recognised as dirty for FAT32, so the
fail-unsafeness made my file system always considered clean.

Check the i/o non-error bit in checkdirty().  Its absence would give
an unrecognized signature in code that is unaware of it, but we now
mask it out of the signature so we have to check it explicitly.  This
combines naturally with the check of the clean bit.

Reviewed by:	rnordier (except for final details)
2004-02-05 15:18:18 +00:00
des
78edb732be Don't create a template file if we're not going to let the user edit it. 2004-02-05 10:57:29 +00:00
pjd
38bd67169d Fixed some non-critical memory leaks and one temporary file leak
(theoretical).

Approved by:	phk, scottl (mentor)
2004-02-05 08:39:38 +00:00
bde
11c7633086 Document the dirty flag and other bits in the first 2 FAT entries
better.  There is a related I/O error flag which we don't support in
the kernel but must support here.  (Support for bits that we don't
understand here is mostly automatic by fail-safeness, but checkdirty()
has fail-unsafeness.)  There are some reserved and don't-care bits
that weren't fully documented and aren't always masked properly.  The
comment about the bits in readfat() will be removed when the masking
is fixed.

Submitted by:	rnordier
2004-02-05 06:55:12 +00:00
bde
12c02b35e9 Prepare to fix checkdirty() by moving it from check.c to fat.c. It is
identical to a subset of readfat(), so it belongs near readfat() if not
in it.
2004-02-05 06:32:16 +00:00
brooks
b8d51aa138 Add ifconfig support for network interface renaming. In the process,
reorganize the printing of the interface name when using wildcard
cloning so it is not printed if it we either immediately rename or
destroy the interface.

Reviewed by:	ru
2004-02-04 02:55:46 +00:00
des
69ab9ceec0 Mechanical whitespace cleanup. Also, note that previous commit was
Sponsored by:	Teleplan AS
2004-02-03 11:12:29 +00:00
des
bd77f8c94f Remove newline characters from error strings. 2004-02-03 11:10:34 +00:00
nectar
39de947ca8 Correct a typo and unbreak the build.
Pointy hat to:	pjd
2004-02-03 04:03:19 +00:00
pjd
9354393ea0 Made use of MNT_USER flag and inform about user responsible for mount
in those cases:
1. File system was mounted by an unprivileged user.
2. File system was mounted by an unprivileged root user.
3. File system was mounted by a privileged non-root user.

Point 1 is when file system was mounted by unprivileged user
(sysctl vfs.usermount was equal to 1 then).

Point 2 is when file system was mounted by root, while sysctl
security.bsd.suser_enabled is set to 0 and sysctl vfs.usermount
is set to 1.

Point 3 is because we want to be ready for capabilities.

Reviewed by:	rwatson
Approved by:	scottl (mentor)
2004-02-02 18:37:30 +00:00
ceri
793b22a99c Spell "disklabel" correctly.
Approved by:	ru
2004-02-01 13:09:26 +00:00
brooks
ee34d661df Use memcpy plus a manual NUL termination when copying the interface name
from the sdl because strlcpy requires that the source string be
NUL-terminated unlike strncpy.

Submitted by:	Peter Jeremy <PeterJeremy at optushome dot com dot au>
2004-01-31 22:59:03 +00:00
obrien
56844e70af Install a 'disklable' alias.
Technical Reviewed by:	ru
2004-01-31 07:39:45 +00:00
obrien
6707230215 Sync with bsdlabel/Makefile. 2004-01-29 18:15:19 +00:00
obrien
e8f03f143e Add a very basic manpage. 2004-01-29 18:12:27 +00:00
guido
27e023aa19 Style(9) option sorting
Submitted by:	Ruslan Ermilov <ru@FreeBSD.org>
2004-01-29 15:14:03 +00:00
guido
a5eee69dd6 Fix manpage and usage() to reflect that -a can be used in combination
with -o

Submitted by:	Ruslan Ermilov <ru@FreeBSD.org>
Pointed out by: Ceri Davies <ceri@submonkey.net
2004-01-29 14:42:26 +00:00
ru
e3539b3617 Removed duplicate $FreeBSD$ tag. 2004-01-29 14:36:16 +00:00
guido
5133532cb7 Unbreak -o fstab and -o current in combination with -a
MFC after:	2 weeks
2004-01-29 13:16:51 +00:00
obrien
b329bb8a2c This has been disconnected from the build since May 2003. GC it, as
bsdlabel and sunlabel are what we use now.
2004-01-28 19:29:16 +00:00
des
cf221c4c0d Style nit in previous commit. 2004-01-27 19:28:13 +00:00
mckusick
38230899d9 Preserve acls option on mounts when taking a snapshot.
Submitted by:	Wiktor Niesiobedzki <freebsd-lists@w.evip.pl>
2004-01-27 18:28:11 +00:00
brooks
280fcfee01 Use IFNAMSIZ instead of a magic value for the length of an interface
name.

Prevent the kernel from potentially overflowing the interface name
variable.  The size argument of strlcpy is complex because the name is
not null-terminated in sdl_data.
2004-01-27 01:43:14 +00:00
cperciva
3a15ac7b11 Avoid dereferencing null pointers in fsck_ffs. (pfatal may return,
so it isn't a safe way of handling [mc]alloc failures.)

PR:		misc/61800
Approved by:	rwatson (mentor)
2004-01-26 15:05:30 +00:00
harti
5ab2525e7f Add support for virtual interfaces. These have no phy chip and, hence, we
need to handle interfaces without phy specially.
2004-01-26 12:17:49 +00:00
maxim
ed6eaf7bd9 o Pass a correct argument to errx(3).
PR:		bin/61846
Submitted by:	Eugene Grosbein
MFC after:	1 week
2004-01-24 19:20:09 +00:00
blackend
d0bcb20ae1 Fix bogus "ffsinfo -c 0" example with "ffsinfo -g 0 -l 4".
PR:		bin/61472
Submitted by:	Alex Popa <razor@ldc.ro>
MFC after:	1 week
2004-01-23 17:35:09 +00:00
mtm
2ee2805e83 grammar 2004-01-23 06:37:19 +00:00
cperciva
7fd2e87e6c Clarify behaviour of ffsinfo: It appends to outfile without
removing any existing contents.

PR:		bin/61473
Submitted by:	Alex Popa <razon@ldc.ro>
MFC after:	7 days
Approved by:	rwatson (mentor)
2004-01-23 05:13:22 +00:00
grehan
2dafdd4f00 Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe
2004-01-22 07:23:36 +00:00
sos
7b3d7d7361 Cosmetics 2004-01-21 21:31:19 +00:00
ru
ca1efbafd6 Mark this manpage as i386-only. 2004-01-21 13:24:38 +00:00
ru
942c095e46 Fixed spacing in previous revision. 2004-01-17 00:31:38 +00:00
ru
6593bb80ea - Build things in pure dictionary order (see sort(1)).
- Unify the conditional assignments section so that architectural
  exclusions come first, then options and !options, sorted by the
  option name, also in directory order, then architecture specific
  sections, sorted by the architecture name, with i386 being a
  traditional exception.

Prodded by:	bde
2004-01-16 15:23:19 +00:00
sam
10ba1b2264 802.11 mode bits are now masks; convert to suit 2004-01-15 15:19:19 +00:00
maxim
d675b0ba7c o -c (compact) flag is ipfw2 feature.
PR:		bin/56328
MFC after:	3 days
2004-01-15 12:59:44 +00:00
maxim
36a468e048 o -f (force) in conjunction with -p (preprocessor) is ipfw2 feature.
MFC after:	3 days
2004-01-15 12:57:04 +00:00
alex
f1fc1fb354 Add RSH to the list of enviroment variables. 2004-01-15 12:13:54 +00:00
ume
ff9ef7b641 -DSMALL will remove the need of dump.c (for rtsol)
Obtained from:	KAME
2004-01-14 17:59:38 +00:00
phk
39966fbafe Note that geometry can also be specified on vnode backed deviecs. 2004-01-12 10:54:09 +00:00
nyan
e535657797 '-DPC98' is not needed. 2004-01-11 09:11:10 +00:00
simon
0cae6b4312 Add manual page links from fsck_ufs.8 and fsck_4.2bsd.8 to fsck_ffs.8,
since there are already the same links for the program binary.

Suggested by:	mat
2004-01-10 14:36:49 +00:00
ceri
91077cabf9 Correct an instance of an erroneous "it's".
PR:		docs/59937
Submitted by:	Ada Lim <ada@bsd.org>
MFC After:	1 day
2004-01-07 23:31:22 +00:00
anholt
7cdd2d8812 Allow trailing slashes for MNT_UPDATE case (mount -u), too.
PR:		bin/59144
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-01-07 05:37:56 +00:00
alfred
fbfb1488fd Hook mount_nfs4 to the build.
Noticed by: rwatson
2004-01-06 21:05:13 +00:00
iedowse
6fde69b7d1 Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assuming
that mksnap_ffs(8) can be found using the current $PATH.

Reviewed by:	mckusick
2004-01-04 17:17:46 +00:00
phk
880a2ed129 Warn that big malloc disks are a panic(8) implementation.
Submitted by:	Colin Percival <cperciva@builder.daemonology.net>
(Who should really get his own bit one of these days!)

PR:	59988
2004-01-02 14:28:06 +00:00
alfred
d82d9c329c Document that mknod(8) can be used to undelete entries under devfs. 2003-12-29 00:37:52 +00:00
bde
20ebc42a34 Oops, highly non-KNF indentation is normal for large expressions in
this program.  Gnu indentation is used for these.  Redo the fix for
the large expression at the end of the previous commit to give gnu
indentation.  The original version was gnuish but had 9 bogus extra
characters of indentation in its continuation lines, perfect tab
lossage on every line, and other bugs.

The previous commit log should have claimed to fix style bugs in the
previous-1 commit (1.5), not the forced null previous commit (1.6).
2003-12-28 01:30:31 +00:00
bde
10a5b874bb Expanded the comment about the -F flag.
Fixed a nearby style bug (unreachable break).
2003-12-27 14:02:52 +00:00