Commit Graph

4585 Commits

Author SHA1 Message Date
ru
1edab47bcf For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
ru
538d41b29b Fixed misspelling of DPADD. 2004-10-24 14:25:53 +00:00
nyan
1785edec02 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
d23b4f0178 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
ed4397c216 Stop amd64 warnings. 2004-10-23 12:42:18 +00:00
andre
d8bf758dbd 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
a9c52a00bc 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
89a47d17f1 Don't prepend "/dev" if an argument given is an absolute pathname.
Reviewed by:	jhb
2004-10-20 05:43:45 +00:00
schweikh
d3c6fd4749 Print a usage message if a non-option is specified.
MFC after:	3 weeks
2004-10-13 20:33:18 +00:00
imp
03880ab294 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
52b5c798bd 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
4be2cde98d Make fsck WARNS=2 clean. 2004-10-09 15:56:34 +00:00
scottl
ab03aa9261 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
9ec3193749 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
e48f05815e Only print progress statistics once per second. 2004-10-08 10:50:40 +00:00
green
aa9118c4bb Reference altq(4) instead of pf.conf(5).
Tip of the hat to:	mlaier
2004-10-08 03:31:09 +00:00
green
3fc47f6b86 Commit forgotten documentation for "diverted" rules. 2004-10-08 03:24:10 +00:00
des
83688271af Promote mediasize and physmem to uintmax_t when comparing them. 2004-10-04 06:54:19 +00:00
des
db7a557c9b Whitespace nit. 2004-10-03 23:53:54 +00:00
des
4be02c5ab0 dumpon builds cleanly at WARNS level 6. 2004-10-03 23:39:14 +00:00
des
c152b8a4ba Verify that the specified device is at least as large as hw.physmem. 2004-10-03 23:38:49 +00:00
des
8078112d39 Wrap some long lines (no content changes) 2004-10-03 23:35:34 +00:00
stefanf
5167f966c5 Don't add integers to void pointers. 2004-10-03 15:48:32 +00:00
green
da2471622c Remove blindly-copied extra include path. 2004-10-03 06:32:37 +00:00
mlaier
7cdddca1e1 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
695d382cd4 Add support to IPFW for matching by TCP data length. 2004-10-03 00:47:15 +00:00
green
0db95a7f76 Add the documentation for IPFW's diverted(-loopback|-output) matches. 2004-10-03 00:35:52 +00:00
green
73b405a8ca 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
67ce728653 Remove accidentally-added O_DIVERTED section. 2004-10-03 00:24:42 +00:00
green
ac46cacd72 Add to IPFW the ability to do ALTQ classification/tagging. 2004-10-03 00:17:46 +00:00
pjd
66afb9c3bb 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
2d26de44e3 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
5a2bb1a2a1 FreeBSD has full support for multiple consoles since 2001. 2004-09-30 09:15:33 +00:00
maxim
3d6ab1177a 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
c3755d96e3 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
b147aabf13 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
c2d9bf6272 Embellish the man page after trying to migrate to gstripe from ccd(4). 2004-09-26 17:29:09 +00:00
pjd
eef59ca8c0 Don't allow to specify wrong stripe size.
Reported by:	obrien
2004-09-26 17:15:42 +00:00
brooks
423727f729 Sort the SEE ALSO list correctly. Update the document date.
Reported by:	ru
2004-09-23 15:26:01 +00:00
brooks
7e9d123453 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
950627db47 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
b02423743a Prepare for 5.x soon becoming -STABLE.
Pointed out by:	-current users
2004-09-19 14:30:59 +00:00
pjd
efe94f8848 Fix '-s' option for large disks and fix printing maximum file system size. 2004-09-19 10:01:51 +00:00
pjd
9788078a49 Document '-p' flag for 'insert' command correct. 2004-09-18 19:02:10 +00:00
le
efd0dee0a5 Use correct format string.
Submitted by:   ssouhlal
2004-09-17 17:08:44 +00:00
pjd
0253dd27d6 Do not exit after printing usage, give geom(8) a chance to show standard
commands.
2004-09-17 08:41:15 +00:00
pjd
43dbd8ca6c - 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
bcc2300c76 - 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
0ec7dcc460 Distinguish between TCQ and NCQ type of tagged queing. 2004-09-15 11:22:05 +00:00
andre
7c87af64dd 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
3b864ed945 WARNS=4 safe. 2004-09-12 07:06:48 +00:00
alfred
e67f1f9181 Fix build. 2004-09-12 02:24:01 +00:00
alfred
5a61e3b1bd Hook mount_autofs to the build. 2004-09-12 01:25:47 +00:00
csjp
e1d33eb349 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
ebe23c638e 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
805864f3a2 Fix a type bug which sometimes wrote unusable lock sectors on the disk. 2004-09-10 12:16:54 +00:00
brooks
3f4a1e19ce 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
4d4bb9e126 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
7600f808c1 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
cd36df972e Fix/clean up return values checking. 2004-09-08 07:57:14 +00:00
pjd
058c0d3387 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
5875e2499e 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
e984b64dc1 Move back to WARNS=2 2004-09-01 08:26:39 +00:00
scottl
f6bf89e8c2 Create DIP_SET() and IBLK_SET() macros to fix lvalue warnings.
Inspired by: kan
2004-09-01 05:48:06 +00:00
alfred
f9a01285aa Enter the autofs. 2004-08-31 16:26:01 +00:00
trhodes
38c7082831 Correct a style bug: remove a gratuitous space between ( and ".
Ok'ed by:	fjoe
2004-08-31 05:19:57 +00:00
peter
5b37a68a23 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
87614bcc02 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
0833f380c0 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
7a625114f5 Warn the user if we are not going to use the whole provider's space. 2004-08-28 02:49:28 +00:00
pjd
d0f343c9e9 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
e7cc04f146 - 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
c5868902ed 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
b0c8bd42f9 Add missing GEOM classes, which are aware of geom(8).
Submitted by:	kuriyama
2004-08-23 06:23:17 +00:00
pjd
1296433406 Fix sysctl name. 2004-08-22 16:22:20 +00:00
pjd
7a4977efd2 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
5af45a19a9 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
b8b0c912ba 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
c4cac00d95 - 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
edf817ec50 Add a line to BUGS section about the need of implementation description. 2004-08-18 16:37:04 +00:00
pjd
8d939dc287 Add some missing empty lines. 2004-08-18 16:14:24 +00:00
pjd
b7dfe400fd Fix typo. 2004-08-18 16:09:20 +00:00
pjd
ad7804a8f5 Actually one can specify more than one device to stop. 2004-08-18 15:56:02 +00:00
pjd
195238f027 Ok, let's try again:
Add manual page for gmirror(8) utility.
2004-08-18 15:54:52 +00:00
pjd
7736acb152 - 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
5db3319f66 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
451db872cf Connect RAID3 GEOM class to the build. 2004-08-16 06:36:21 +00:00
pjd
cf88b55e91 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
1a202ba67e Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +00:00
phk
4c4cf33207 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
ab810108ee Removed commented out bitrot. 2004-08-13 14:18:24 +00:00
csjp
b8bdc239c0 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
4cf034c6b1 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
8892cb588e 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
1df8c446ff 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
fd6ebd2648 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
1b566971a5 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
04810d75e4 The multiplier prefix is actually a multiplier suffix. 2004-08-09 14:43:50 +00:00
pjd
4ed5ed7f23 - 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
bc6d05fb75 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
782b0fc9c2 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
64bc6e5476 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
46c88a5120 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
ae55bfedcd Due to popular demand, hook up geom_vinum to the build. 2004-08-07 16:16:59 +00:00
marcel
d343091b96 Document the remove command. 2004-08-07 07:52:31 +00:00
marcel
688b48518c 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
8d237af21d Use __FBSDID. 2004-08-07 06:24:25 +00:00
marcel
461f044a4a 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
191ec9c1ea 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
2dcc49c304 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
b871b0b411 Allow 'create <filename>'. 2004-08-04 00:23:00 +00:00
marcel
46c640c402 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
f1400edc89 What's in a name: s/disklabel/bsdlabel/ 2004-08-02 19:22:11 +00:00
pjd
6156c53510 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
cc3fe5f835 - 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
dc690d9eee 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
f7c6732e05 Use SHLIBDIR instead of LIBDIR. This should fix buildworld breakage.
Reported by:	des
2004-07-31 09:20:27 +00:00
pjd
b165052441 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
bbe86f8681 Connect GEOM_MIRROR class to the build. 2004-07-30 23:18:53 +00:00
pjd
6a967b5939 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
0c1db20a77 - 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
91d97d6893 Fix typo. 2004-07-30 08:03:46 +00:00
kan
8a6bee7011 Make lookup_host function invocation parameter match its prototype. 2004-07-29 18:04:06 +00:00
le
d5aed5bddc 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
df295f2f1e No need to include if_var.h. 2004-07-28 16:34:42 +00:00
harti
6367451377 Get rid of several unneeded includes (if.h, if_var.h, if_mib.h). 2004-07-28 16:32:17 +00:00
kan
42f94457f7 Downgrade WARNS level until GCC 3.4.2 warning are fixed. 2004-07-28 06:00:09 +00:00
kan
5fa59097f8 Avoid casts as lvalues. 2004-07-28 05:59:22 +00:00
kan
5f7de0b43d Downgrade WARNS level until GCC 3.4.2 warning have been fixed. 2004-07-28 05:57:48 +00:00
yar
c540e7e945 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
8a6e9bab0c 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
9ea883be8c Change naming scheme from /dev/<name>.stripe to /dev/stripe/<name>. 2004-07-26 16:10:27 +00:00
pjd
adaf7885e0 Change naming scheme from /dev/<name>.concat to /dev/concat/<name>. 2004-07-26 16:08:32 +00:00
stefanf
f617e8389c 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
6d20dba657 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
5fb138b3be 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
cbbace431e Give better diagnostic for problems with backing files. 2004-07-25 08:17:23 +00:00
le
5458c85122 Fix potential buffer overflow.
PR:            bin/14697
Submitted by:  Matthew <kienow@infinet.com>
2004-07-24 19:11:40 +00:00
keramida
a93a29cd5b 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
2b19687226 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
a19fa22924 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
1a249f440b '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
5f0a8df2ba Add special lines for 'help commands'. 2004-07-21 09:43:31 +00:00
harti
6f163a1ccf 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
511a96105e 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
8abaaeeb72 The natm sub-command was missing in the TOC of the helpfile. 2004-07-20 16:50:57 +00:00
pjd
3d268c83c7 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
05348daaf0 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
6d6e74c558 `off' is a keyword, not a parameter name.
Obtained from:	DragonFly
2004-07-18 09:57:47 +00:00
pjd
b8f48f8599 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
98a1564754 Mention the vfs.usermount sysctl.
Obtained from:	NetBSD via DragonFly BSD
MFC after:	3 days
2004-07-18 01:51:59 +00:00
pjd
85c213b534 Add a reference to glabel(8). 2004-07-14 13:32:00 +00:00
phk
ae28a93e50 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
92b5cb1be1 Document sysctl variables.
Based on:	simon's patch
2004-07-13 12:32:20 +00:00
pjd
715f2d3ef2 Those sysctl are used to control GEOM class, not a userland utility.
Reviewed by:	simon
2004-07-13 12:30:11 +00:00
pjd
b17aa9eab6 Document sysctls variables used by GEOM_STRIPE class.
Submitted by:	simon
2004-07-13 11:28:40 +00:00
pjd
26b1fa3b84 Decrease default stripe size to 4k, as we have "FAST" mode turned on by
default.
2004-07-09 14:41:51 +00:00
trhodes
b4a8905e78 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
eb809cb269 Slight markup and grammar fixes. 2004-07-07 21:00:57 +00:00
ru
6e28d19886 mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
ru
0f76b3df6e Removed redundant and unsafe BINDIR redefinition. 2004-07-07 17:33:20 +00:00
pjd
4e6ebbf0ee Fix copy&paste bug. 2004-07-06 18:18:20 +00:00
stefanf
d087b40b84 Parenthesised string literals are invalid in initialisers for character arrays.
Use braces instead.
2004-07-06 17:48:34 +00:00
pjd
f8b8b32b92 - 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
2640f71eaf MFp4: gmirror(8) is coming soon, and we need g_metadata_read() there. 2004-07-05 02:06:44 +00:00
phk
b2369d6e67 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
7f3b38237e One more hard sentence break. 2004-07-03 23:01:44 +00:00
pjd
6157b3cebf Grammar nits.
Submitted by:	David Magda <dmagda@ee.ryerson.ca>
2004-07-03 08:36:09 +00:00
ru
13a170fa1a Deal with double whitespace. 2004-07-03 00:13:43 +00:00
ru
a80e8fe473 Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
pjd
3ad94a6543 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
64477062e6 Bump up the date and add spaces around commas. Thanks to ru@ for noticing. 2004-07-02 18:39:15 +00:00
ru
43c762c43d Deal with harmful leading whitespace. 2004-07-02 18:37:52 +00:00
arun
03dd0be5bb Added the ability to create and display Linux/Windows GPT partitions to gpt(8). 2004-07-01 22:27:12 +00:00
imp
8f52d3a780 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
5bd353630a 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
04d8f1a633 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
58c0b4ec90 Print mediasize in human readable form as well. 2004-06-21 09:20:06 +00:00
iedowse
a80c51d742 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
72a547fc8a Note that conscontrol set and unset are an interface for TIOCCONS. 2004-06-18 20:06:04 +00:00
joerg
f659467d66 Fix indentation of continuation lines to (hopefully) comply with
style(9).

Reminded by:	bde
2004-06-18 15:08:08 +00:00
green
646dcbf721 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
90db7eed2a Add missing newlines. 2004-06-17 06:04:14 +00:00
mlaier
ce7530e4d3 Commit userland part of pf version 3.5 from OpenBSD (OPENBSD_3_5_BASE). 2004-06-16 23:39:33 +00:00
pjd
838c10c155 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
b8c17bebc9 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
0e384035b6 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
9e7ef983d9 Connect geom(8) to the build.
Reminded by:	des
2004-06-15 17:31:35 +00:00
bms
3e55a2db42 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
7430dae5d8 mdoc(7) police
Submitted by:	ru
2004-06-14 19:31:10 +00:00
bms
354efd98b3 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
5aa9cc6c4a Make fdisk initialize the first instead of the last slice by default. 2004-06-14 07:21:19 +00:00
le
b1d9959973 Add gvinum, the geom_vinum userland tool. 2004-06-12 21:22:47 +00:00
eik
e8c6f871b4 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
0b8200060f 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
9e934dc715 Fixed a bug spotted by compiling with -Wall. 2004-06-10 07:51:11 +00:00
ru
6c0402254a 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
5c36e4ee65 Reapply traditionally lost fixes, fixed some more.
This manpage needs an English clenup.
2004-06-05 20:22:15 +00:00
stefanf
a867585b89 Typedefing an array of incomplete structs is non-standard C code.
Approved by:	das (mentor)
2004-06-02 23:02:31 +00:00
pjd
0446de4199 Remove extra semicolon.
Inspired by:	fjoe
2004-06-02 21:21:10 +00:00