Commit graph

4969 commits

Author SHA1 Message Date
Dima Dorfman 7e06d7bcbc Sort the list results by the unit number. The list returned by the
kernel is in the order the devices were made, which is not useful to
the user. Also, remove the "%d more" test since the kernel does not
return the complete count in md_pad[0] (maybe it should?).

Submitted by:	Wojciech A. Koszek
2005-12-22 10:32:11 +00:00
Maxim Konovalov 52146665a5 o Remove rev. 1.14 debug printf(3) leftovers.
PR:		bin/90389
Submitted by:	Gavin Atkinson
OK'ed by:	phk
2005-12-20 18:18:37 +00:00
Tai-hwa Liang cc2c6edb77 Fixing multi-session disc mount by passing the correct "ssector" option
to the kernel.

Submitted by:	Enache Adrian <enache at rdslink dot ro>
2005-12-19 05:52:37 +00:00
Joseph Koshy 80615950df Rev 1.15 should have incremented the date on this manual page. 2005-12-19 02:55:44 +00:00
Ceri Davies ced42c6c54 Document the pfsync(4) specific maxupd parameter, with text mostly taken
from OpenBSD's manpage.

PR:		docs/89256
Submitted by:	Pim van Pelt <pim at ipng dot nl>
MFC after:	3 days
2005-12-16 11:38:18 +00:00
Sam Leffler 29d58c7173 add control for packet bursting 2005-12-14 19:44:39 +00:00
Maxim Konovalov 54ccb3ac94 o Correct usage(): delete command takes as argument array not channel.
PR:		bin/90353
Submitted by:	Gavin Atkinson
MFC after:	1 week
2005-12-14 06:33:18 +00:00
Andrew Thompson 91f6764e93 Add support for creating span ports so that one can snoop bridged traffic
from another interface/machine/network.

Obtained from:	OpenBSD
MFC after:	2 weeks
2005-12-14 02:52:13 +00:00
Sam Leffler aa5eb8878e display a bssid that's zero with the -v option 2005-12-14 01:22:26 +00:00
Ruslan Ermilov a5b0d9050a [mdoc] add missing space before a punctuation type argument. 2005-12-13 17:07:52 +00:00
Gleb Smirnoff 40b1ae9e00 Add a new feature for optimizining ipfw rulesets - substitution of the
action argument with the value obtained from table lookup. The feature
is now applicable only to "pipe", "queue", "divert", "tee", "netgraph"
and "ngtee" rules.

An example usage:

  ipfw pipe 1000 config bw 1000Kbyte/s
  ipfw pipe 4000 config bw 4000Kbyte/s
  ipfw table 1 add x.x.x.x 1000
  ipfw table 1 add x.x.x.y 4000
  ipfw pipe tablearg ip from table(1) to any

In the example above the rule will throw different packets to different pipes.

TODO:
  - Support "skipto" action, but without searching all rules.
  - Improve parser, so that it warns about bad rules. These are:
    - "tablearg" argument to action, but no "table" in the rule. All
      traffic will be blocked.
    - "tablearg" argument to action, but "table" searches for entry with
      a specific value. All traffic will be blocked.
    - "tablearg" argument to action, and two "table" looks - for src and
      for dst. The last lookup will match.
2005-12-13 12:16:03 +00:00
Craig Rodrigues cf9e56b04e For reiserfs, pass mount parameters directly to nmount() instead
of forking an external mount_reiserfs program.

Reviewed by:	dumbbell
2005-12-12 19:51:37 +00:00
Sam Leffler 439b4702f3 add mcastrate support
MFC after:	1 week
2005-12-12 19:23:55 +00:00
Brooks Davis 82dbbc4120 When we get a bogus hostname in an option, drop the option rather than
refusing the lease.  This allow obtaining leases on misadministered
networks that use host names with underscores in them.

MFC After: 3 days
2005-12-10 03:46:14 +00:00
Gleb Smirnoff 02d48226cc Cleanup _FreeBSD_version. 2005-12-09 13:03:30 +00:00
David E. O'Brien 16edf4d4b5 Tweak -32 description and add -32 FILES. 2005-12-09 03:12:25 +00:00
Pawel Jakub Dawidek df3d5a19fc Teach NOP GEOM class how to gather the following statistics:
- number of read I/O requests,
- number of write I/O requests,
- number of read bytes,
- number of written bytes.
Add 'reset' subcommand for resetting statistics.
2005-12-08 23:00:31 +00:00
Pawel Jakub Dawidek f13942a746 - The geom(8) utility only uses three types of arguments: string (char *),
value (intmax_t) and boolean (int).
  Based on that provide three functions:
        - gctl_get_ascii()
        - gctl_get_int()
        - gctl_get_intmax()
- Hide gctl_get_param() function, as it is only used internally in
  subr.c.
- Allow to provide argument name as (fmt, ...).
- Assert geom(8) bugs (missing argument is a geom(8) bug).

- Clean-up and simplify the code by using new functions and assumtions
  (no more checking for missing argument).

Tested by:	regression tests
2005-12-07 01:38:27 +00:00
Craig Rodrigues f6db44904f Remove workaround for old GCC bugs.
Submitted by:	ru
2005-12-03 19:59:35 +00:00
Craig Rodrigues 748e259bc4 Simplify parsing of mount options by passing
"rw" option down to kernel, since vfs_donmount() can now parse it.
2005-12-03 01:57:58 +00:00
David Xu 4b609e4caa Remove mqueuefs from LINKS, it is no longer needed for nmount interface.
Noticed by: rodrigc
2005-12-02 04:25:54 +00:00
Craig Rodrigues 30cb180f7c Remove unsupported "dev" option from comments of mntopts.h.
Requested by:	jkoshy
2005-12-02 03:55:02 +00:00
Ruslan Ermilov ee3e1c4c08 Sync usage() with SYNOPSIS. 2005-12-01 22:03:34 +00:00
Ruslan Ermilov 855b068a9a Add -q to usage(). 2005-12-01 21:59:24 +00:00
Tai-hwa Liang 9f6442eea2 Fixing yet another regression introduced in rev1.37 by preserving cs_local
pointer such that local to DOS code page conversion with combined option
'-L,-D' works again.

Reviewed by:	rodrigc
2005-12-01 00:18:48 +00:00
Hajimu UMEMOTO 36c263cca9 We couldn't specify the rule for filtering tunnel traffic since an
IPv6 support was committed:

- Stop treating `ip' and `ipv6' as special in `proto' option as they
  conflict with /etc/protocols.

- Disuse `ipv4' in `proto' option as it is corresponding to `ipv6'.

- When protocol is specified as numeric, treat it as it is even it is
  41 (ipv6).

- Allow zero for protocol as it is valid number of `ip'.

Still, we cannot specify an IPv6 over an IPv4 tunnel like before such
as:

	pass ipv6 from any to any

But, now, you can specify it like:

	pass ip4 from any to any proto ipv6

PR:		kern/89472
Reported by:	Ga l Roualland <gael.roualland__at__dial.oleane.com>
MFC after:	1 week
2005-11-29 15:25:09 +00:00
Gleb Smirnoff e36ffd3b15 Catch up with ip_dummynet.h rev. 1.38 and fix build. 2005-11-29 12:01:26 +00:00
Gleb Smirnoff b090e4ce1f Garbage-collect now unused struct _ipfw_insn_pipe and flush_pipe_ptrs(),
thus removing a few XXXes.
  Document the ABI breakage in UPDATING.
2005-11-29 08:59:41 +00:00
Craig Rodrigues 2207c7648e Remove MNT_NODEV mount option. In RELENG_6, MNT_NODEV was a no-op.
The presence of MNT_NODEV was confusing the am-utils autoconf scripts.

PR:	conf/79715
2005-11-29 00:28:17 +00:00
David Xu 95b5832940 Change filesystem name from mqueue to mqueuefs for style consitent,
sort LINKS list.
2005-11-27 08:32:41 +00:00
David Xu 5958a74924 Support mounting POSIX message queue filesystem. 2005-11-26 12:53:18 +00:00
Tai-hwa Liang 6a604ed4fb It turns out that set_charset() invokes build_iovec_argf() which modifies
iov address internally through realloc(3).  However, since the function
parameter wasn't designed to allow the modified iov being passed back to
the caller, we ended up feeding iov with several corrupted entries(this
depends on how many arguments were pushed into iovec before set_charset())
to nmount(2).

This commit fixes this regression introduced in rev1.37 such that
mount_msdosfs(8) with code page conversion option(-W,-D) enabled works again.

Reviewed by:	rodrigc
2005-11-25 19:55:14 +00:00
Tai-hwa Liang 4acc9672b5 It turns out that set_charset() invokes build_iovec() which modifies
iov address internally through realloc(3).  However, since the function
parameter wasn't designed to allow the modified iov being passed back to
the caller, we end up feeding iov with several corrupted entries(depends on
how many arguments were pushed into iovec before set_charset()) to nmount(2).

This commit fixes this regression introduced in rev1.31 such that
mount_cd9660(8) with code page conversion option(-C) enabled works again.

Reviewed by:	rodrigc
2005-11-25 19:48:53 +00:00
Tai-hwa Liang 6973ce04c4 Fixing a regression introduced in rev1.72 by connecting cd9660 to the
external mounting program list as well; otherwise, entry like the following
in /etc/fstab wouldn't work:

	/dev/acd0	/mnt/cdrom	cd9660	ro,-C=big5	0	0

Reviewed by:	rodrigc
2005-11-24 17:35:05 +00:00
Joseph Koshy 8334958a7f Add a -f configfile option to devd(8), based on a patch submitted by
Wojciech A. Koszek.

Submitted by:	Wojciech A. Koszek <dunstan@freebsd.czest.pl>
2005-11-24 14:39:41 +00:00
Ruslan Ermilov 8bec746911 Fix prototype. 2005-11-24 14:27:53 +00:00
Joel Dahl 19797b2256 s/5.5/6.0/ in HISTORY section.
Discussed with:	ru
2005-11-24 09:25:10 +00:00
Craig Rodrigues 7f2444598a Remove UFS-specific parts from mount(8).
For mounting UFS, all mount options are passed directly to nmount(),
without any UFS-specific logic.
2005-11-23 23:22:56 +00:00
Craig Rodrigues 722705c6b2 These files were never hooked into the build, and were the start
of an nmount()-based mount program for UFS.
Now that mount(8) calls nmount() directly for mounting UFS filesystems,
they are unnecessary.
2005-11-23 23:06:33 +00:00
Craig Rodrigues 35d6c7f50e Do not pass userquota and groupquota mount options to nmount().
These options are read from fstab by quotacheck(8), but are not
valid mount options that need to be passed down the the filesystem.

Noticed by:	maxim
2005-11-23 20:17:27 +00:00
Tai-hwa Liang 62c7cb517a - Adding the missing 'W' option back which was accidentally removed
in rev1.37.
- Fixing a core dump inside build_iovec_argf by providing a !NULL format
  string to vsnprintf(3).

Reviewed by:	rodrigc
2005-11-23 19:52:14 +00:00
Craig Rodrigues f2bccf4766 Bring mount_nullfs up to WARNS=6. 2005-11-21 22:51:16 +00:00
Craig Rodrigues b1e6b7123d For mounting a UFS filesystem, call nmount() directly, instead of having
special logic which called mount() in a separate mount_ufs() function.
2005-11-21 22:07:54 +00:00
Lukas Ertl ff98e7ce7a Fix whitespace issues.
Pointed out by:    joel@
2005-11-20 10:35:46 +00:00
Lukas Ertl 8160e983a0 Finally bring in what was produced during Google SoC 2005:
Add functions to rename objects and to move a subdisk from one drive
to another.

Add manual page (finally).

Bring up-to-date the online help.

Obtained from:  Chris Jones <chris.jones@ualberta.ca>
Sponsored by:   Google Summer of Code 2005
MFC in:         1 week
2005-11-19 20:26:52 +00:00
Ruslan Ermilov 4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Ruslan Ermilov 389ec19476 Do not install boot_i386.8 on all architectures. 2005-11-17 09:39:36 +00:00
Craig Rodrigues d9fa6ce711 Do not pass noauto to nmount() or external mount program.
Noticed by:	maxim
2005-11-16 02:13:27 +00:00
Craig Rodrigues 9fce8c898e In build_iovec(), if passed in len is -1, check to see if
val is NULL before doing strlen() to calculate new len.

Submitted by:	maxim
2005-11-14 17:39:00 +00:00
Maxim Konovalov c22d354139 o Style: restore tab indentation mangled in the previous delta. 2005-11-14 16:04:01 +00:00
Alexander Nedotsukov 13f8bb7143 Reuse delete_and_clear() template helper.
Approved by:	imp
2005-11-14 02:01:10 +00:00
Craig Rodrigues 9955dcd2d8 Increase WARNS level to 6. 2005-11-13 03:25:39 +00:00
Craig Rodrigues 825197f9a0 Convert mount_msdosfs to use nmount(). 2005-11-13 03:24:44 +00:00
Craig Rodrigues f06d169763 Increase WARNS level to 6. 2005-11-13 01:47:04 +00:00
Craig Rodrigues 15ee67c1fa Changes to reflect that size_t parameter to build_iovec() is a size_t. 2005-11-13 01:45:32 +00:00
Craig Rodrigues c02fbedfee Increase WARNS level to 6 2005-11-13 01:40:36 +00:00
Craig Rodrigues fe4ad3bc06 Convert mount_cd9660 to use nmount(). 2005-11-13 01:39:55 +00:00
Craig Rodrigues b19e74ca20 - Make size parameter to build_iovec() a size_t, not an int
- Add build_iovec_argf() helper function, for help converting old
  mount options which used the mount_argf() function for the mount() syscall.

Discussed with:	phk
2005-11-13 01:27:57 +00:00
Craig Rodrigues 6f5f1a6b3e - Minor fixes to raise WARNS level to 6.
- Teach the mount program to call the nmount() syscall directly
- Preserve existing method of calling mount() for UFS, until we clean things
  up.
- Preserve existing method of forking and calling external mount programs for
  mfs, msdosfs, nfs, nfs4, ntfs, nwfs, nullfs, portalfs, reiserfs, smbfs,
  udf, umapfs, unionfs
- devfs, linprocfs, procfs, ext2fs call nmount() syscall directly, since
  that is all those external mount programs were doing

Reviewed by:	phk
Discussed on:	arch
2005-11-12 20:12:56 +00:00
John Baldwin 6efabadaef Document -32 flag in usage() output as well.
Requested by:	ru
MFC after:	1 week
2005-11-11 21:24:21 +00:00
John Baldwin cff2cd1d3c Document the -32 switch available on amd64.
Submitted by:	Steve Kargl sgk at troutmask dot apl dot washington dot edu
MFC after:	1 week
2005-11-11 20:29:50 +00:00
Pawel Jakub Dawidek d941425873 Rename GEOM class kernel module g_md.ko to geom_md.ko for consistency
with the rest.

mdconfig.c:	Simplify mdmaybeload() function.
mdioctl.h:	Removed (now unused) #define.
loader.conf:	Sort GEOM classes properly.

OK'ed by:	phk
2005-11-11 11:31:23 +00:00
Ruslan Ermilov c51a26d4b6 Fix malloc size (visible on amd64, with "kldconfig -r"). 2005-11-07 19:22:20 +00:00
Brooks Davis bed230409f SSIDs are of length 32-bytes and not NUL terminated. Use the correct
length and bail immediatly if the returned length is wrong rather than
attempting to set an correct value.

This commit differs from the patch in the PR in the use of exit instead
of return and the use of a defined value for the array.

Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch at Vitsch dot net>
PR:		bin/74509
2005-10-30 16:31:05 +00:00
Brooks Davis ab77cda1ad Don't crash when given an invalid nwkey string.
PR:	misc/88159
2005-10-28 21:57:04 +00:00
Ceri Davies dd7337fc3a gmirror.8:
Note the default balancing algorithm and stripe size.

geom_mirror.c:
  Slightly friendlier error message.

Reviewed by:	pjd
2005-10-25 13:45:07 +00:00
Christian S.J. Peron cd5f2f95b6 Restore the documentation about uid, gid or prison based rules requiring
that debug.mpsafenet be set to 0. It is still possible for dead locks to
occur while these filtering options are used due to the layering violation
inherent in their implementation.

Discussed:	-current, rwatson, glebius
2005-10-23 16:15:02 +00:00
Diomidis Spinellis aa590d16d0 Remove a diagnostic message that can't occur: we lost the ability to
handle the old filesystem format on 2002/06/21.
2005-10-20 11:20:55 +00:00
Brooks Davis 94d2d4eb04 Make devd WARNS=4 clean and bump WARNS accordingly. This will insure
that future variable shadowing bugs don't compile.

Reviewed by:	imp
Compiled on:	alpha i386 sparc64
2005-10-19 21:21:22 +00:00
Warner Losh de02eec866 As pointed out on current@, we don't want to declare a variable in a scope
that just uses the variable and throws it away.

This should fix the subsystem keyword wrt media-type.

MFC After: 2 days
2005-10-19 18:10:34 +00:00
Stefan Farfeleder 2110d9c31a Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR:	86355
2005-10-19 15:37:43 +00:00
Maxim Sobolev 50d89fc56a Add new option `q', which makes second stage loader quiet unless autoboot
is disabled or fails.

MFC after:	1 week
2005-10-16 01:55:35 +00:00
Ralf S. Engelschall de90a634cb Fix parsing of mdmfs(8) option "-w <user>:<group>" in case <user> or
<group> is a numeric user/group ID instead of a user/group name (as
explicitly intended to be allowed by both the manual page and the
implementation).

Before this fix, mdmfs(8) aborted:

| # mdmfs -s 32m -w 0:0 md /var/tmp/foo
| Assertion failed: (mip->mi_have_uid), function extract_ugid, file /usr/src/sbin/mdmfs/mdmfs.c, line 555.
| Abort trap (core dumped)

The "mi_have_[ug]id" fields were only set in case a name lookup was
successful. Instead they also have to be set in case the string to
integer conversion was successful.

Additionally, as a result of this fix, two assertions at the end of
the function are now always true and hence can be just be removed. It
is guarrantied that both the UID and the GID are set when the function
returns regularily, else it would have been already bailed out with
usage()/exit(3) or errx(3) before.

Spotted by:	Christoph Schug <chris@schug.net>
MFC after:	3 days
2005-10-14 11:21:21 +00:00
Hajimu UMEMOTO d02b24bc22 fixed a crush when either -lh or -ls option is used.
Obtained from:	KAME
2005-10-13 18:12:46 +00:00
Hajimu UMEMOTO 0625d8dcb8 setkey(8) is not WARNS=2 compliant, yet. 2005-10-13 17:57:34 +00:00
Pawel Jakub Dawidek a0b8a85fc6 setkey(8) was repo-copied from usr.sbin/ to sbin/.
This will allow for NFS mount of /usr over IPsec.

Discussed on:	arch@
2005-10-12 21:40:41 +00:00
Yaroslav Tykhiy 08b9134350 Replace "/etc/make.conf" with references to make.conf(5)
where applicable.  The main reason for this change is that
the location of make.conf is not constant and can be
modified via __MAKE_CONF.  This change also improves
hyper-text linkage in our manpages.

MFC after:	2 weeks
2005-10-10 14:55:59 +00:00
Craig Rodrigues 066b4c1658 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes. 2005-10-07 06:39:08 +00:00
Craig Rodrigues 429cd02cab Bump WARNS up to 3. 2005-10-07 02:22:48 +00:00
Craig Rodrigues aedf10aca9 In prmount(), use an unsigned int variable to eliminate
'comparison between signed and unsigned' compiler warning.
2005-10-07 02:22:04 +00:00
Craig Rodrigues e24dc56a22 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
Make prototype in extern.h match prototype in mount_ufs.c
2005-10-07 02:18:20 +00:00
Andrew Thompson a33a86ea1f Display the status of the spanning tree for each port.
member: xl0 flags=7<LEARNING,DISCOVER,STP>
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
to:
        member: xl0 flags=7<LEARNING,DISCOVER,STP>
                port 3 priority 128 path cost 55 forwarding
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
                port 1 priority 128 path cost 55 learning
2005-10-07 00:32:16 +00:00
Yaroslav Tykhiy a2d3802cd8 Eliminate some unneeded code bits. 2005-10-06 15:05:55 +00:00
Warner Losh 09c47e76fb media-type predicate is used in contexts where device-name is undefined.
In those contexted, use subsystem instead.

# This causes dhclient to run again when I plug in my ethernet cable to
# my fxp card in my laptop.
2005-10-04 22:22:51 +00:00
Yaroslav Tykhiy 7fc2ce8ae4 Use a callback to set up a vlan interface so that "vlan"
and "vlandev" commands can be specified in any order.
This makes the code more compact and clear as well.

Improve error check on vlan argument.

MFC after:	2 weeks
2005-10-04 11:48:03 +00:00
Marc Fonvieille 6e70d91547 - s/cd0c/cd0
- Bump revision date to match many content changes since last revision
2005-10-03 17:24:51 +00:00
Olivier Houchard 5719aedcda Compile fdisk for arm as well. 2005-10-03 14:22:15 +00:00
Ruslan Ermilov 259fcfd358 Document that -q option is also applicable to the "change" command.
PR:		docs/85095
Submitted by:	Rostislav Krasny
2005-10-02 12:55:34 +00:00
Maxim Konovalov 125450bbb7 o Restore kerneldumpheader.architectureversion bytes swopping
mangled in rev. 1.72.

PR:		bin/86805
Submitted by:	Gavin Atkinson
MFC after:	3 days
2005-10-02 11:31:45 +00:00
Gleb Smirnoff 1f8f09b081 Now ifconfig is the one right way to turn polling on. Thus, remove
the "if" clauses.
2005-10-01 19:14:34 +00:00
Yaroslav Tykhiy 9e241c5ef2 For the sake of consistency and easier typing,
introduce "-tunnel" as an alias for "deletetunnel".
The latter is overly long and prone to typos,  but
keep it for POLA since it costs nothing.

MFC after:	5 days
2005-09-29 23:53:29 +00:00
Yaroslav Tykhiy 7259f7c495 Forgot to touch .Dd in the previous commit. 2005-09-29 23:39:37 +00:00
Yaroslav Tykhiy b0dcc11c43 Deprecate the useless argument to -vlandev.
Submitted by:	Fredrik Lindberg <fli+freebsd-current at shapeshifter.se> (implementation)
Reviewed by:	brooks
MFC after:	5 days
2005-09-29 23:38:24 +00:00
Ruslan Ermilov e6f7c17ebd err() -> errx() where appropriate. 2005-09-29 13:09:04 +00:00
Pawel Jakub Dawidek 0896d83c56 Add a note in example as well, that last sector is used for metadata,
so it don't provoke confusions.

Noticed by:	Victor Sudakov <sudakov@sibptus.tomsk.ru>
MFC after:	2 days
2005-09-29 08:56:15 +00:00
Anton Berezin 064b93d5ea Introduce "route del" as an alias to "route delete".
Reviewed by:	arch
2005-09-28 12:12:15 +00:00
Max Laier 13f5260916 Redirect bridge(4) to if_bridge(4) and rename sysctl accordingly.
Reminded by:	ru
2005-09-28 08:18:55 +00:00
Ruslan Ermilov 8c81e13758 Simplified markup. 2005-09-28 06:57:56 +00:00
Pawel Jakub Dawidek 09d5b70601 Update usage. 2005-09-24 08:20:45 +00:00
Pawel Jakub Dawidek 90217cddd0 Add '-q' option, which (when used with '-m' option) just tells if the given
module is loaded or compiled into the kernel.
This is useful mostly in startup scripts, when module should be loaded only
if it wasn't compiled into the kernel nor already loaded, eg.:

	kldstat -q -m g_eli || kldload geom_eli.ko || err 1 'geom_eli module failed to load.'
2005-09-23 23:52:26 +00:00