Commit graph

4447 commits

Author SHA1 Message Date
Brian Feldman 26dc327082 Reference altq(4) instead of pf.conf(5).
Tip of the hat to:	mlaier
2004-10-08 03:31:09 +00:00
Brian Feldman 17db1a040f Commit forgotten documentation for "diverted" rules. 2004-10-08 03:24:10 +00:00
Dag-Erling Smørgrav 9872f15d75 Promote mediasize and physmem to uintmax_t when comparing them. 2004-10-04 06:54:19 +00:00
Dag-Erling Smørgrav 53504142a9 Whitespace nit. 2004-10-03 23:53:54 +00:00
Dag-Erling Smørgrav 9f4ed0f59b dumpon builds cleanly at WARNS level 6. 2004-10-03 23:39:14 +00:00
Dag-Erling Smørgrav c0046e261f Verify that the specified device is at least as large as hw.physmem. 2004-10-03 23:38:49 +00:00
Dag-Erling Smørgrav 842ddc99ec Wrap some long lines (no content changes) 2004-10-03 23:35:34 +00:00
Stefan Farfeleder 4c86f66f52 Don't add integers to void pointers. 2004-10-03 15:48:32 +00:00
Brian Feldman a5559720e1 Remove blindly-copied extra include path. 2004-10-03 06:32:37 +00:00
Max Laier bda6cef0a4 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
Brian Feldman c99ee9e042 Add support to IPFW for matching by TCP data length. 2004-10-03 00:47:15 +00:00
Brian Feldman 391a0e3306 Add the documentation for IPFW's diverted(-loopback|-output) matches. 2004-10-03 00:35:52 +00:00
Brian Feldman 6daf7ebd28 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
Brian Feldman 5599f1b52b Remove accidentally-added O_DIVERTED section. 2004-10-03 00:24:42 +00:00
Brian Feldman 974dfe3084 Add to IPFW the ability to do ALTQ classification/tagging. 2004-10-03 00:17:46 +00:00
Pawel Jakub Dawidek 0618f3dcba 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
Ruslan Ermilov 52501c5ede 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
Ruslan Ermilov 295a9701bb FreeBSD has full support for multiple consoles since 2001. 2004-09-30 09:15:33 +00:00
Maxim Konovalov 13e3f0b717 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
Poul-Henning Kamp 39d969aedf 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
Warner Losh 89e3b380f9 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
David E. O'Brien 9a6e0a5e5c Embellish the man page after trying to migrate to gstripe from ccd(4). 2004-09-26 17:29:09 +00:00
Pawel Jakub Dawidek 0c8a9da21e Don't allow to specify wrong stripe size.
Reported by:	obrien
2004-09-26 17:15:42 +00:00
Brooks Davis 0513a60b6b Sort the SEE ALSO list correctly. Update the document date.
Reported by:	ru
2004-09-23 15:26:01 +00:00
Brooks Davis 9f4709d67c 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
Christian S.J. Peron d413c2e405 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
Ruslan Ermilov bf899c64f3 Prepare for 5.x soon becoming -STABLE.
Pointed out by:	-current users
2004-09-19 14:30:59 +00:00
Pawel Jakub Dawidek f4d2631187 Fix '-s' option for large disks and fix printing maximum file system size. 2004-09-19 10:01:51 +00:00
Pawel Jakub Dawidek ffb2425733 Document '-p' flag for 'insert' command correct. 2004-09-18 19:02:10 +00:00
Lukas Ertl 0a16dedc07 Use correct format string.
Submitted by:   ssouhlal
2004-09-17 17:08:44 +00:00
Pawel Jakub Dawidek 5c8d2ac300 Do not exit after printing usage, give geom(8) a chance to show standard
commands.
2004-09-17 08:41:15 +00:00
Pawel Jakub Dawidek 138cedfdc6 - 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
Pawel Jakub Dawidek b830359bc5 - 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
Søren Schmidt 536beae5a8 Distinguish between TCQ and NCQ type of tagged queing. 2004-09-15 11:22:05 +00:00
Andre Oppermann 7c0102f575 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 Perlstein 2d3744053b WARNS=4 safe. 2004-09-12 07:06:48 +00:00
Alfred Perlstein 78f606edb4 Fix build. 2004-09-12 02:24:01 +00:00
Alfred Perlstein 1171033fec Hook mount_autofs to the build. 2004-09-12 01:25:47 +00:00
Christian S.J. Peron 3a27af0dd4 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 Konovalov 00ed660991 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
Poul-Henning Kamp b7cc6a2200 Fix a type bug which sometimes wrote unusable lock sectors on the disk. 2004-09-10 12:16:54 +00:00
Brooks Davis 86e0bd0dc0 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
John-Mark Gurney d31ba6257b 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 Perlstein 7a3b8aefbf 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
Pawel Jakub Dawidek 122abe0385 Fix/clean up return values checking. 2004-09-08 07:57:14 +00:00
Pawel Jakub Dawidek 6eafaa600e 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 Davis 9e734b4468 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
Scott Long 4e50d4499a Move back to WARNS=2 2004-09-01 08:26:39 +00:00
Scott Long c3b2344b93 Create DIP_SET() and IBLK_SET() macros to fix lvalue warnings.
Inspired by: kan
2004-09-01 05:48:06 +00:00
Alfred Perlstein acc387c393 Enter the autofs. 2004-08-31 16:26:01 +00:00
Tom Rhodes 8f28fe7f42 Correct a style bug: remove a gratuitous space between ( and ".
Ok'ed by:	fjoe
2004-08-31 05:19:57 +00:00
Peter Wemm c591d41f7c 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
Pawel Jakub Dawidek edcf2d2891 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 Konovalov 9ec4f2e1b3 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
Pawel Jakub Dawidek 6654ade6e5 Warn the user if we are not going to use the whole provider's space. 2004-08-28 02:49:28 +00:00
Pawel Jakub Dawidek 08249e9e6e 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
Pawel Jakub Dawidek f792f1d865 - 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
Pawel Jakub Dawidek c3d6fe74a7 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
Pawel Jakub Dawidek b3530b8e7f Add missing GEOM classes, which are aware of geom(8).
Submitted by:	kuriyama
2004-08-23 06:23:17 +00:00
Pawel Jakub Dawidek 742925a31b Fix sysctl name. 2004-08-22 16:22:20 +00:00
Pawel Jakub Dawidek dba915cfee 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
Pawel Jakub Dawidek f5a2f7feac 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
John Baldwin b72ea57f3b 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
Pawel Jakub Dawidek 925fa96b13 - 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
Pawel Jakub Dawidek e3a3431fe8 Add a line to BUGS section about the need of implementation description. 2004-08-18 16:37:04 +00:00
Pawel Jakub Dawidek 0e45644862 Add some missing empty lines. 2004-08-18 16:14:24 +00:00
Pawel Jakub Dawidek 3d9be34543 Fix typo. 2004-08-18 16:09:20 +00:00
Pawel Jakub Dawidek c9b309abe7 Actually one can specify more than one device to stop. 2004-08-18 15:56:02 +00:00
Pawel Jakub Dawidek 4510a84d6b Ok, let's try again:
Add manual page for gmirror(8) utility.
2004-08-18 15:54:52 +00:00
Pawel Jakub Dawidek 0fe2ba03d6 - 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
Ruslan Ermilov 9f676d2ed6 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
Pawel Jakub Dawidek e81856c34c Connect RAID3 GEOM class to the build. 2004-08-16 06:36:21 +00:00
Pawel Jakub Dawidek 2d1661a5b6 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
Stefan Farfeleder 4eae39bfdf Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +00:00
Poul-Henning Kamp e53915c97f 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
Ruslan Ermilov a55042cb4e Removed commented out bitrot. 2004-08-13 14:18:24 +00:00
Christian S.J. Peron a8247db1de Remove trailing whitespace and change "prisoniD" to "prisonID".
Pointed out by:	simon
Approved by:	bmilekic (mentor)
2004-08-13 02:50:59 +00:00
Christian S.J. Peron 31c88a3043 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
Pawel Jakub Dawidek 896a489487 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
Hartmut Brandt ca0f4b1dba 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
Pawel Jakub Dawidek c38d2f4eca 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 Oppermann 5f9541ecbd 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
Dag-Erling Smørgrav 8180729228 The multiplier prefix is actually a multiplier suffix. 2004-08-09 14:43:50 +00:00
Pawel Jakub Dawidek 6c74f5177c - 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
John-Mark Gurney a246f097d6 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
Pyun YongHyeon a740f6ee14 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
Dag-Erling Smørgrav 4c814dfc27 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
Dag-Erling Smørgrav 266e79978a 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
Lukas Ertl dbf29ccf9c Due to popular demand, hook up geom_vinum to the build. 2004-08-07 16:16:59 +00:00
Marcel Moolenaar 7eece0972d Document the remove command. 2004-08-07 07:52:31 +00:00
Marcel Moolenaar 6686e95fef 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 Moolenaar 2cedbd6ee8 Use __FBSDID. 2004-08-07 06:24:25 +00:00
Marcel Moolenaar f61bdfe072 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
Pawel Jakub Dawidek cea363682f 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 Tetlow 5036802031 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
Lukas Ertl 5c1accc9ab Allow 'create <filename>'. 2004-08-04 00:23:00 +00:00
Marcel Moolenaar 2ef70adc0c 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 Moolenaar 814db82be5 What's in a name: s/disklabel/bsdlabel/ 2004-08-02 19:22:11 +00:00
Pawel Jakub Dawidek fe5e0baab7 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
Stefan Farfeleder adb89653fc - 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