Commit Graph

4866 Commits

Author SHA1 Message Date
brooks
c93fbf7bf1 NULL is not a valid time_t.
Submitted by:	sam
2005-06-07 04:14:54 +00:00
brooks
bfb49a1939 We don't support BPF write filters at this time.
Submitted by:	sam
2005-06-07 04:13:52 +00:00
brooks
df346bd933 Take the OpenBSD version of the Makefile to resolve conflicts as the old
one is irrelevent.  Add $FreeBSD.
2005-06-07 04:08:50 +00:00
brooks
95219de6ac This commit was generated by cvs2svn to compensate for changes in r147072,
which included commits to RCS files with non-trunk default branches.
2005-06-07 04:05:09 +00:00
brooks
9066b3f834 Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tag
OPENBSD_3_7).
2005-06-07 04:05:09 +00:00
brooks
490c515d02 Remove the bits to build the isc-dhclient. 2005-06-07 04:02:10 +00:00
brooks
8890293394 Temporarily disconnect dhclient from the build while I import the
OpenBSD version.
2005-06-07 03:59:26 +00:00
sos
877683a848 Open devices RDONLY for ioctls. That makes it work on open devices to which
GEOM doesn't allow WR access.
2005-06-06 20:46:51 +00:00
philip
2828ecf11a Fix a silly little typo I just spotted. 2005-06-06 06:47:33 +00:00
thompsa
e8bfe6c248 Connect if_bridge to the build.
Approved by:	mlaier (mentor)
2005-06-05 03:32:53 +00:00
thompsa
dc83783f40 Add if_bridge, which provides more advanced Ethernet bridging and 802.1d
spanning tree support.

Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R.
Thorpe in NetBSD.

Reviewed by:	mlaier, bms, green
Silence from:	-net
Approved by:	mlaier (mentor)
Obtained from:	NetBSD
2005-06-05 02:59:26 +00:00
green
497a5998af Better explain, then actually implement the IPFW ALTQ-rule first-match
policy.  It may be used to provide more detailed classification of
traffic without actually having to decide its fate at the time of
classification.

MFC after:	1 week
2005-06-04 19:04:31 +00:00
imp
f80a31a9ee Revert last. It was the result of mismerges from cvs not an actual
need.  _sconfig already was there in the correct place.

Noticed by: ru@
2005-06-03 15:53:37 +00:00
imp
0bf2c018af Build sconfig on i386 to match where drivers are made it configures 2005-06-03 15:38:39 +00:00
mlaier
f2254cf702 Add support for IPv4 only rules to IPFW2 now that it supports IPv6 as well.
This is the last requirement before we can retire ip6fw.

Reviewed by:	dwhite, brooks(earlier version)
Submitted by:	dwhite (manpage)
Silence from:	-ipfw
2005-06-03 01:10:28 +00:00
jhb
1a81cb90f4 Fix some warnings on 64-bit archs.
Reviewed by:	sam
2005-06-01 14:55:45 +00:00
delphij
ee88062325 Add a handy macro to represent null mount option, MOPT_NULL, and make
use of the macro in sbin/mount*'s, by replacing:

	mopts[] = {
	    MOPT_STDOPTS,
	    { NULL }
	}

With:
	mopts[] = {
	    MOPT_STDOPTS,
	    MOPT_NULL
	}

This change will help to reduce the situation that we don't explicitly
initialize "struct mntopt"'s.  It should not contribute to any
functional/logical changes as far as I can tell.
2005-06-01 09:39:36 +00:00
stefanf
7f6920d685 Remove #ident directives, they don't exist on the vendor branch anymore. 2005-05-31 20:28:49 +00:00
delphij
2163cbcb0f Constify savedir pointer, and remove an accompaning strdup() call. 2005-05-29 16:28:07 +00:00
charnier
278cc09264 Give variable an initial value. Use errx() instead of fprintf(). 2005-05-29 16:07:10 +00:00
charnier
a40be9078d rscid -> __FBSDID. Mark parameter as __unused when necessary. 2005-05-29 15:57:00 +00:00
ru
c3abc18f4d Fix order (I introduced some time ago) broken in previous revision. 2005-05-25 07:31:05 +00:00
mux
f539b2792a Only build mount_reiserfs(8) on i386, it exists only there for now.
Spotted by:	ru
2005-05-24 23:06:10 +00:00
dumbbell
103db97f6e Connect mount_reiserfs(8) to the build.
Approved by:	mux (mentor)
2005-05-24 12:37:18 +00:00
dumbbell
6b2d30ffe5 Import of mount_reiserfs(8), used to mount a ReiserFS filesystem.
Approved by:	mux (mentor)
2005-05-24 12:34:45 +00:00
ume
428418e43b - do DNS lookup for symbolic names specified for a destination
or gateway.
- improves error reporting using gai_strerror(3) instead of
  printing "bad value".
- remove "0" for servname argument for getaddrinfo(3).

Submitted by:	Andreas Kohn <andreas __at__ syndrom23.de>
MFC after:	1 week
2005-05-23 14:12:32 +00:00
ru
5a7d45e3b5 Synchronize program's usage() with manpage's SYNOPSIS. 2005-05-21 07:08:32 +00:00
mlaier
ce2b072e9f Unbreak handling of "ip[v]6" protocol and option flag. No more segfaults
and not every protocol is IPv6.
2005-05-21 03:27:33 +00:00
sos
ac2cc57f35 Print the rigth argv string on error (too much c&p).. 2005-05-20 06:23:40 +00:00
sam
01b6c1ef44 guard against bogus address data
Submitted by:	Bakul Shah
2005-05-20 03:58:53 +00:00
ru
0a6d657eb7 Fix the contents of the underneath .depend files and "make checkdpadd". 2005-05-17 14:29:06 +00:00
imp
1cec98375c Ignore sigpipe so we can properly detach clients to the pipe.
Submitted by: Fredrik Lindberg
2005-05-16 20:51:46 +00:00
darrenr
7b001e5d5e Enable building /sbin/ipf (but not the rescue version) with the ability to
parse bpf strings for filter rules in ipf.conf
2005-05-16 16:22:55 +00:00
ru
e7b25f55b8 Fixed markup from the previous revision. 2005-05-16 15:09:13 +00:00
sos
74f9e41533 Reflect the new usage. 2005-05-16 13:32:23 +00:00
sos
05399c3127 Change the way ioctls are issue to ATA.
The most prominent part is that its now possible to issue ata_requests
directly to say acd0, instead of going through the cumbersome /dev/ata
device.
2005-05-16 13:07:27 +00:00
ume
e33ba03345 NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.
2005-05-13 16:31:11 +00:00
glebius
4be4400945 'ngtee' also depends on net.inet.ip.fw.one_pass. 2005-05-11 12:58:15 +00:00
jmallett
a30e94db03 shutdown(2)'s how argument as 0 is nowhere near as cool as SHUT_RD 2005-05-11 02:50:41 +00:00
glebius
32e61f472f IPFW version 2 is the only option now in HEAD. Do not confuse
users of future releases with instructions about building IPFW2
on RELENG_4.
2005-05-04 13:14:57 +00:00
fjoe
5542bd31ad Add -m option (find module using modfind() and stat it). 2005-05-04 12:46:43 +00:00
mlaier
8f88cd5e08 Update ifconfig's pfsync module for 3.7 pfsync(4) 2005-05-03 16:59:14 +00:00
mlaier
b75ba09627 Adapt Makefiles for pfctl(8) and authpf(8) to 3.7 sources. 2005-05-03 16:57:38 +00:00
delphij
638d4d00fc Cleanups for gcc4:
- Use socklen_t for socket functions
 - Remove an unnecessary extern
 - Signed/unsigned cleanups

Reviewed by:	harti
2005-05-02 10:31:27 +00:00
delphij
4497410a32 WARNS=6 and gcc4 cleanup:
- Use const where necessary
	- Use __unused where applicable
	- Rename variables that is conflicit with global definations
2005-05-02 10:13:38 +00:00
delphij
6b13894421 include stdarg.h for va_list 2005-05-02 10:04:16 +00:00
delphij
347f9b1d5a Make gcc4 happy by making consistent signedness. 2005-05-02 10:00:39 +00:00
nyan
fa923d7b23 - Merged some missing changes from fdisk/fdisk.c.
- Remove ifdef PC98.
- Make WARN=4 clean.
2005-05-01 10:08:35 +00:00
nyan
5009ff132c cosmetic changes. 2005-05-01 09:50:02 +00:00
nyan
09a70338b7 Merged more changes from fdisk/fdisk.c. 2005-05-01 05:04:05 +00:00
nyan
fa2fcbedc1 Use NDOSPART macro instead of a magic number. 2005-05-01 05:01:55 +00:00
nyan
27eb420eea Merged from src/sbin/fdisk/fdisk.c revision 1.77. 2005-05-01 04:14:01 +00:00
phk
691e072f68 If we resort to opening a slice instead of the base device, do so with
the correct mode for our arguments.
2005-04-29 21:24:27 +00:00
pjd
85babab07f Remove trailing spaces. 2005-04-29 07:57:50 +00:00
darrenr
f739412edd Patches from Ruslam Ermilov to remove NetBSD bits from Makefiles and cleanup
build problems with rescue.
2005-04-28 16:26:35 +00:00
brooks
3f77e18f9b Fix a the previous commit. I wanted to remove the if and always run the
body not remove both.

Reported by:	ceri
Pointy hat:	brooks
2005-04-26 20:22:31 +00:00
brooks
347035a2c9 Don't force IPv6 proto to be printed numericaly.
Noticed by:	ceri
2005-04-26 20:00:07 +00:00
darrenr
56966568e9 Not looking for ipfilter source files in the right place 2005-04-26 15:35:50 +00:00
pjd
5745532ed1 Fix stripe size in example.
Found by:	kris
MFC after:	3 days
2005-04-26 09:23:21 +00:00
darrenr
8d4b1e38ea remove old directories used to build ipfilter tools 2005-04-25 18:59:29 +00:00
darrenr
1cd27551f9 There's only one ipfilter directory now 2005-04-25 18:56:42 +00:00
darrenr
0010fa7c21 create a new build heirarchy for ipfilter tools 2005-04-25 18:55:52 +00:00
des
e669069b43 - distinguish between the device name (what the user called it on the
command line) and the device path (what we passed to open()).  Use
  the former in diagnostics.
- when adding or removing partitions, print a single line to stdout for
  each partition that was added or removed, indicating its name.
- add an -a option to 'gpt remove' which must be explicitly specified
  to remove all partitions.

Approved by:	marcel (in prinicple)
MFC after:	2 weeks
2005-04-24 20:08:29 +00:00
pjd
c7eadd3426 Remove duplicated description of 'clear' subcommand.
Pointed out by:	marck
X-MFC-after:	few seconds
2005-04-23 12:17:21 +00:00
jcamou
7deff5f03c Use .Pa instead of .Xr to follow mdoc(7)
specifications.

Noticed by:	trhodes
Approved by:	trhodes (mentor)
MFC after:	1 day
2005-04-20 01:56:33 +00:00
brooks
f3ecaa630b Add IPv6 support to IPFW and Dummynet.
Submitted by:	Mariano Tortoriello and Raffaele De Lorenzo (via luigi)
2005-04-18 18:35:05 +00:00
imp
edc45448f9 'r' disk devices no longer exist, so don't try to create a pathname
that has an 'r' in it.

This also eliminates a bogus use of strlcat.
PR: 80064
2005-04-18 15:08:29 +00:00
imp
6bc67c1366 Fix parsing of nomatch events.
minor debug fix.
2005-04-18 02:54:07 +00:00
pjd
1dcaba98da Document 'clear' and 'dump' subcommands.
MFC after:	1 week
2005-04-15 23:51:20 +00:00
rees
9c0d411b10 Remove dead code.
PR:		bin/78125
Submitted by:	Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Approved by:	alfred
2005-04-14 20:27:30 +00:00
mdodd
4aeb6a67e2 Show descriptions for type CTLTYPE_NODES. 2005-04-13 06:59:07 +00:00
mdodd
d7cdbc0750 Zero buffers. Seatbelt against sysctl(3) returning non-NUL terminated
string data.
2005-04-13 06:56:31 +00:00
stefanf
93dc7c672e ISO C does not allow unnamed union members. 2005-04-08 21:37:41 +00:00
stefanf
2bd54b55a6 Fix typo in comment. 2005-04-08 21:31:20 +00:00
ceri
c28bf29163 Grammatical improvement. 2005-04-08 10:32:22 +00:00
brooks
948057b503 When accessing the sysctl vfs.nfs.iodmax, don't report errors as being
from accessing vfs.nfs.iodmin.
2005-04-07 20:37:04 +00:00
pjd
ebb3a9b55b Allow classes to specify local source files.
MFC after:	3 weeks
2005-04-07 15:57:38 +00:00
pjd
3035fc244c Empty error buffer is not an error.
MFC after:	3 weeks
2005-04-07 06:46:11 +00:00
jcamou
b2320665ef Document the configuration files used.
PR:		docs/79572
Submitted by:	Josh Paetzel <josh@tcbug.org>
Approved by: 	trhodes (mentor)
2005-04-05 22:29:47 +00:00
brooks
151bf3aeda Be more specific when complaining about bit masks. 2005-04-05 22:26:02 +00:00
imp
5f1a63f33a Remove debug from last commit 2005-04-03 16:35:58 +00:00
imp
7749046121 /*- 2005-04-03 05:18:28 +00:00
rwatson
0ee22a0cda Don't define FS_DEBUG by default, as this causes growfs to write debugging
information to /tmp/growfs.debug, which is a world-writable directory.

MFC after:	3 days
Reported by:	Jon Passki <cykyc@yahoo.com>
2005-03-31 04:10:31 +00:00
rwatson
fe3d70d054 Don't default to '/var/tmp/ffsinfo' for the output of ffsinfo(8), since
/var/tmp is a world-writable directory.

MFC after:	3 days
Reported by:	Jon Passki <cykyc@yahoo.com>
2005-03-31 04:05:17 +00:00
joerg
dd28208fbe Fix grammar error caused by my previous edit.
While being here, also update the copyright year.

Submitted by:	ru
2005-03-30 18:54:41 +00:00
sos
f820cdfe29 This is the much rumoured ATA mkIII update that I've been working on.
o       ATA is now fully newbus'd and split into modules.
        This means that on a modern system you just load "atapci and ata"
        to get the base support, and then one or more of the device
        subdrivers "atadisk atapicd atapifd atapist ataraid".
        All can be loaded/unloaded anytime, but for obvious reasons you
        dont want to unload atadisk when you have mounted filesystems.

o       The device identify part of the probe has been rewritten to fix
        the problems with odd devices the old had, and to try to remove
        so of the long delays some HW could provoke. Also probing is done
	without the need for interrupts, making earlier probing possible.

o       SATA devices can be hot inserted/removed and devices will be created/
        removed in /dev accordingly.
	NOTE: only supported on controllers that has this feature:
	Promise and Silicon Image for now.
	On other controllers the usual atacontrol detach/attach dance is
	still needed.

o	Support for "atomic" composite ATA requests used for RAID.

o       ATA RAID support has been rewritten and and now supports these
        metadata formats:
                 "Adaptec HostRAID"
                 "Highpoint V2 RocketRAID"
                 "Highpoint V3 RocketRAID"
                 "Intel MatrixRAID"
                 "Integrated Technology Express"
                 "LSILogic V2 MegaRAID"
                 "LSILogic V3 MegaRAID"
                 "Promise FastTrak"
                 "Silicon Image Medley"
		 "FreeBSD PseudoRAID"

o       Update the ioctl API to match new RAID levels etc.

o       Update atacontrol to know about the new RAID levels etc
        NOTE: you need to recompile atacontrol with the new sys/ata.h,
        make world will take care of that.
	NOTE2: that rebuild is done differently from the old system as
	the rebuild is now done piggybacked on read requests to the
	array, so atacontrol simply starts a background "dd" to rebuild
	the array.

o       The reinit code has been worked over to be much more robust.

o       The timeout code has been overhauled for races.

o	Support of new chipsets.

o       Lots of fixes for bugs found while doing the modulerization and
        reviewing the old code.

Missing or changed features from current ATA:

o       atapi-cd no longer has support for ATAPI changers. Todays its
        much cheaper and alot faster to copy those CD images to disk
        and serve them from there. Besides they dont seem to be made
        anymore, maybe for that exact reason.

o       ATA RAID can only read metadata from all the above metadata formats,
	not write all of them (Promise and Highpoint V2 so far). This means
	that arrays can be picked up from the BIOS, but they cannot be
	created from FreeBSD. There is more to it than just the missing
	write metadata support, those formats are not unique to a given
	controller like Promise and Highpoint formats, instead they exist
	for several types, and even worse, some controllers can have
	different formats and its impossible to tell which one.
	The outcome is that we cannot reliably create the metadata of those
	formats and be sure the controller BIOS will understand it.
	However write support is needed to update/fail/rebuild the arrays
	properly so it sits fairly high on the TODO list.

o       So far atapicam is not supported with these changes. When/if this
	will change is up to the maintainer of atapi-cam so go there for
	questions.

HW donated by:  Webveveriet AS
HW donated by:  Frode Nordahl
HW donated by:  Yahoo!
HW donated by:  Sentex
Patience by:	Vife and my boys (and even the cats)
2005-03-30 12:03:40 +00:00
joerg
a1f08bc5f7 Support VTOC volume names. This can be useful to distinguish multiple
disks in a system.  Solaris' format(1m) displays the volume names in
the disk overview.

MFC after:	1 month
2005-03-30 09:33:10 +00:00
kan
7d43aa0207 Initialize iovlen variable to 0 before passing it by reference to the
build_iovec function.

Tripped over by:	Craig  Rodrigues
2005-03-28 22:21:45 +00:00
ken
a856c3c2df Add "report only" functionality to 'camcontrol format', so users can get a
report on the status of a format already running on a drive.

Fix status reporting for 'camcontrol format'.  This was broken in rev 1.34
of camcontrol.c, almost 4 years ago!

Submitted by:	joerg (most of the reportonly changes)
MFC after:	3 days
2005-03-26 05:34:54 +00:00
cperciva
a59a08fc46 When executing mount_foo, pass "mount_foo" as argv[0] instead of "foo".
This unbreaks "/rescue/mount -t foo" -- previously it was necessary to
explicitly call "/rescue/mount_foo".

Hints from:	gordon
X-MFC after:	3 days (if approved by re@)
2005-03-26 04:45:53 +00:00
brooks
6d4772ae40 Remove bogus (but harmless) -I.. from CFLAGS. It makes no difference to
.depends other then the commant line.

Also remove -g from CFLAGS.  The user should add it to CFLAGS if they
desire debug support.

Reviewed by:	ru (in concept)
MFC After:	7 days
2005-03-25 22:08:59 +00:00
imp
ea5af1c34a Revert bogus += -g change. I needed it to debug the problem.
Noticed by: njl, Andrej Tobola
2005-03-25 17:30:20 +00:00
imp
931f79b738 Restore the ability to read FreeBSD 1 tapes (and I think any net2
based tapes, but I'm not sure where NFS_MAGIC was introduced after
4.3).  When support for the pre-4.4 format was removed (the ability to
read 4.2 and 4.3 BSD tapes), the old format inode conversion was
junked as well.  However, FreeBSD 1 dump tapes use the NFS_MAGIC
format, but have this inode format.  Before, restore would fail
complaining that '.' wasn't found and the root directory wasn't on
this tape.  Since the conversion from the not so old format is
relatively trivial, restore the code to make that conversion.

FreeBSD 1 dumps are once again readable.

MFC After: a few days
2005-03-25 07:35:59 +00:00
imp
490dc8aaa3 dcvt is unused since the support for converting pre-4.4 tapes was
removed.  Go ahead and remove it and struct odirent since it too is
unused.

# FreeBSD 1.1.5 tapes are still unreadable, but 2.0 and newer work.
2005-03-25 06:57:50 +00:00
imp
713c7197f0 c_tapea and c_firstrec are used for TS_TAPE blocks, so convert them
for the old (4.4-lite through FreeBSD 4.x and *BSD) format.  It looks
like they aren't used for TS_INODE, but conversion costs so little
there that I've not removed them there (in case my grep was wrong).

This makes at least some of the tapes work for me again.  Now, to
regresion test all my dusty tapes...
2005-03-25 06:03:11 +00:00
cperciva
b11927ff86 Add verbiage to the description of the noexec mount option clarifying
that it really wasn't intended as a security feature.

Wording mostly by: simon
Discussed with:	secteam
2005-03-23 04:17:48 +00:00
pjd
26774156e7 Fix use of uninitialized buf[0].
Reported by:	stefanf
MFC after:	3 days
2005-03-22 22:05:44 +00:00
pjd
0a7d613dc5 Truncate nextboot.conf file on creation, so existing garbage will be removed.
Submitted by:	Gary Allan <dragonfly@gallan.plus.com>
Obtained from:	DragonFlyBSD
MFC after:	3 days
2005-03-21 23:44:04 +00:00
brueffer
18c31229e8 Xref carp(4) and polling(4).
MFC after:	3 days
2005-03-19 16:14:31 +00:00
imp
2496170557 In order to print out the dump dates correctly, the date and ddate fields
also need to be convereted for old tapes for records of type TAPE.
2005-03-18 21:06:54 +00:00
phk
326c6367dc Typo.
Submitted by:	Hiroharu Tamaru <tamaru@myn.rcast.u-tokyo.ac.jp>
2005-03-18 20:21:46 +00:00
imp
ac254d8554 Sync usage and man page with reality. There's no '-c' command line
flag today.  Maybe we should still retain it, but I'll let others fight
that windmill.
2005-03-18 17:49:08 +00:00
harti
f6d2d1ffc3 Forgot to change the pointer to the snmp_atm sources after repo-copy.
Correct this by pointing to the new location.

Pointy hat to:	harti

Submitted by:	keramida
2005-03-15 07:38:15 +00:00
pjd
2762d2e8a6 Be sure that class name storaed in 'class_name' is lower case.
MFC after:	1 week
2005-03-14 15:00:51 +00:00
pjd
4c29f3b1e1 Define subcommands' usage inside g_command structure.
MFC after:	1 week
2005-03-14 14:25:47 +00:00
pjd
70e7ef2f36 - Add gc_usage field to g_command structure. This will allow to define
usage for a subcommand, so no 'usage' function has to be implemented
  in class library.
- Bump version number as it breaks ABI, but don't provide backward
  compatibility, because there are probably no external consumers of this
  geom(8).
This allows to print more precise usage for standard commands and simplify
class libraries a bit.

MFC after:	1 week
2005-03-14 14:24:46 +00:00
pjd
8ef3f502d0 Instead of documenting every standard subcommand's argument everywhere,
just leave reference to geom(8).

MFC after:	1 week
2005-03-14 13:14:04 +00:00
pjd
b1046d1ec5 Document subcommands' arguments.
MFC after:	1 week
2005-03-14 13:06:09 +00:00
pjd
1d8fbec83f Document '-s' option of 'status' subcommand.
MFC after:	1 week
2005-03-14 12:37:55 +00:00
pjd
664873178e Add '-s' option to 'status' subcommand. It produces script-friendly output:
# gmirror status
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
                       ad2s1a
mirror/data  DEGRADED  da0
                       da1 (76%)
                       da2
# gmirror status -s
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
mirror/root  COMPLETE  ad2s1a
mirror/data  DEGRADED  da0
mirror/data  DEGRADED  da1 (76%)
mirror/data  DEGRADED  da2

MFC after:	1 week
2005-03-14 12:33:19 +00:00
pjd
74672647f0 Use int instead of size_t (%*s needs int).
MFC after:	1 week
2005-03-14 08:34:02 +00:00
delphij
ebc7aa2a14 printf(3) expects that %*s having an int parameter, which generates
warning on 64-bit platforms.  Explicitly cast these values to int
to work around this issue, as these values are tend to be small.

Spotted by:	ia64 tinderbox
2005-03-14 04:33:13 +00:00
pjd
e421eec8b6 - Document 'status' subcommand.
- Update copyrights.

MFC after:	1 week
2005-03-13 19:38:12 +00:00
pjd
9aad0c73fc Add 'status' command which prints general information about devices.
For example:

# gmirror status
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
                       ad2s1a
mirror/data  DEGRADED  da0
                       da1 (76%)
                       da2

MFC after:	1 week
2005-03-13 19:34:27 +00:00
pjd
bc988d83e6 Update copyrights. 2005-03-13 19:11:57 +00:00
pjd
72c79585cf Change function names related to 'list' command from 'show_one_*' to
'list_one_*'.

MFC after:	1 week
2005-03-13 19:10:13 +00:00
pjd
17fc089e24 When listing all devices (geoms) from the given class, skip geoms without
providers.
This prevents from listing geoms like <name>.sync which can be confusing.
It still allows to show details about it by giving its name when listing.

MFC after:	1 week
2005-03-13 16:45:41 +00:00
ume
5f96af1a75 gbde(8) is also rejndael user.
Reported by:	phk
2005-03-11 22:07:04 +00:00
cperciva
786407525b Belatedly update the md5(1) man page to reflect the addition of sha256. 2005-03-10 09:56:39 +00:00
cperciva
180357cd92 In light of the recent 2^69 operation collision-finding attack on SHA1,
add support for SHA256.

Tested on:	i386, sparc64
Tested using:	NIST test vectors, built-in tests
X-MFC-after:	5.4-RELEASE
2005-03-09 19:23:04 +00:00
stefanf
2eaa74ad22 Prefer the __printflike() macro to GCC's __attribute__ stuff. 2005-03-09 10:10:51 +00:00
delphij
50d65e6e8d Make background fsck based summary adjustments actually work by
initializing the sysctl mibs data before actually using them.

The original patchset (which is the actual version that is running
on my testboxes) have checked whether all of these sysctls and
refuses to do background fsck if we don't have them.  Kirk has
pointed out that refusing running fsck on old kernels is pointless,
as old kernels will recompute the summary at mount time, so I
have removed these checks.

Unfortunatelly, as the checks will initialize the mib values of
those sysctl's, and which are vital for the runtime summary
adjustment to work, we can not simply remove the check, which
will lead to problem when running background fsck over a dirty
volume.  Add these checks in a different way: give a warning rather
than refusing to work, and complain if the functionality is not
available when adjustments are necessary.

Noticed by:	A power failure at my lab
Pointy hat:	me
MFC After:	3 days
2005-03-07 08:42:49 +00:00
iedowse
352e54a36d Use a signal-safe type for two variables that are used to synchronise
with a signal handler. This fixes a race condition introduced by
compiler reordering that caused dump to sometimes get stuck,
especially while dumping large filesystems.
2005-03-02 02:30:08 +00:00
pjd
b375ed0383 We can specify device size in bytes. Document this in usage. 2005-03-01 14:56:49 +00:00
brueffer
18848be824 Typos and grammar fixes, wordsmithing 2005-02-28 01:33:10 +00:00
pjd
668a028670 - Add md_provsize field to metadata, which will help with
shared-last-sector problem.
  After this change, even if there is more than one provider with the same
  last sector, the proper one will be chosen based on its size.
  It still doesn't fix the 'c' partition problem (when da0s1 can be confused
  with da0s1c) and situation when 'a' partition starts at offset 0
  (then da0s1a can be confused with da0s1 and da0s1c). One can use '-h'
  option there, when creating device or avoid sharing last sector.
  Actually, when providers share the same last sector and their size is equal,
  they provide exactly the same data, so the name (da0s1, da0s1a, da0s1c)
  isn't important at all.
- Provide backward compatibility.
- Update copyright's year.

MFC after:	1 week
2005-02-27 23:07:47 +00:00
pjd
45fc09dc07 - Add GEOM_LIBRARY_PATH environment variable which allows to specify an
alternative to /lib/geom/ path where shared libraries are stored.
- Improve debugging.

MFC after:	3 days
2005-02-27 21:14:58 +00:00
pjd
1d91900267 Add SHSEC class to the list of geom(8)-aware classes.
MFC after:	3 days
2005-02-27 17:56:59 +00:00
phk
537769f699 Remove filtering on major device number. These are assigned randomly
these days so filtering on them makes no sense other than as a foot-shooting
device.
2005-02-27 17:22:36 +00:00
obrien
0214e187af style(9). 2005-02-26 01:19:21 +00:00
pjd
3f4b3cea66 Add a missing comma. 2005-02-25 17:22:23 +00:00
obrien
3f720a91ed Allow a forced dump even if the dump header information is inconsistent.
Output more verbosity with additional -v's.

Submitted by:	seanc
2005-02-24 02:45:10 +00:00
trhodes
506f73b1a9 Fix a couple of grammar nits.
PR:		77437
Submitted by:	Paul A. Hoadley <paulh@logicsquad.net> (original version)
2005-02-24 01:00:09 +00:00
andre
9094f4f16b Bring back the full packet destination manipulation for 'ipfw fwd'
with the kernel compile time option:

 options IPFIREWALL_FORWARD_EXTENDED

This option has to be specified in addition to IPFIRWALL_FORWARD.

With this option even packets targeted for an IP address local
to the host can be redirected.  All restrictions to ensure proper
behaviour for locally generated packets are turned off.  Firewall
rules have to be carefully crafted to make sure that things like
PMTU discovery do not break.

Document the two kernel options.

PR:		kern/71910
PR:		kern/73129
MFC after:	1 week
2005-02-22 17:40:40 +00:00
glebius
35d5701d76 Use afswch->af_other_status for carp_status() and pfsync_status().
Sponsored by:	Rambler
2005-02-22 14:07:47 +00:00
glebius
e1d22638d0 Add CARP (Common Address Redundancy Protocol), which allows multiple
hosts to share an IP address, providing high availability and load
balancing.

Original work on CARP done by Michael Shalayeff, with many
additions by Marco Pfatschbacher and Ryan McBride.

FreeBSD port done solely by Max Laier.

Patch by:	mlaier
Obtained from:	OpenBSD (mickey, mcbride)
2005-02-22 13:04:05 +00:00
mr
66cd660bb1 Document the terabyte "-s" parameter in the usage string.
Split the usage line to not exceed 80 chars.
2005-02-21 09:09:07 +00:00
delphij
b62e1ca825 The recomputation of file system summary at mount time can be a
very slow process, especially for large file systems that is just
recovered from a crash.

Since the summary is already re-sync'ed every 30 second, we will
not lag behind too much after a crash.  With this consideration
in mind, it is more reasonable to transfer the responsibility to
background fsck, to reduce the delay after a crash.

Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to
control this behavior.  When set to nonzero, we will get the
"old" behavior, that the summary is computed immediately at mount
time.

Add five new sysctl variables to adjust ndir, nbfree, nifree,
nffree and numclusters respectively.  Teach fsck_ffs about these
API, however, intentionally not to check the existence, since
kernels without these sysctls must have recomputed the summary
and hence no adjustments are necessary.

This change has eliminated the usual tens of minutes of delay of
mounting large dirty volumes.

Reviewed by:	mckusick
MFC After:	1 week
2005-02-20 08:02:15 +00:00
delphij
eba8271ca0 When creating a new FFS file system, the block size will indirectly
affect the largest file size that is allowed by the file system.
On the other hand, when creating a snapshot, the snapshot file will
appear as it is as big as the file system itself.  Hence we will not
be able to create a file system on large file systems with small
block sizes.

Add a warning about this, and gives some hints to correct the issue.

Reviewed by:	mckusick
MFC After:	1 week
2005-02-20 06:33:18 +00:00
pjd
4debf0685e Fix year in copyrights. 2005-02-16 22:19:13 +00:00
obrien
3999e04217 va_list style tweaks 2005-02-16 06:48:35 +00:00
obrien
b5f200c138 Fix grammar error. 2005-02-15 22:31:05 +00:00
ru
6b6b8c04f6 Expand contractions. 2005-02-13 23:45:54 +00:00
ru
1541af42f1 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
trhodes
0c303b6045 Reword a sentence to conform with our mdoc(7) style.
Modify wording in a sentence to avoid a run on within ().
Remove a contraction.

Submitted by:	Joel Dahl <joel@automatvapen.se> (original version)
2005-02-12 23:23:53 +00:00
ru
f4d1c5e662 - Fixed description of the "destroy" command options.
- Document the "nuke" command.
- Mention which commands correspond to which functions.
2005-02-12 21:47:05 +00:00
ru
dc86422ce7 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:39:51 +00:00
ru
719be5d341 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
glebius
ac4a47b2e5 - Correctly spell MOD_QUIESCE
- use .Dv for it

MFC after:	3 days
2005-02-09 22:06:16 +00:00
ru
114ea39c76 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
glebius
319ffb2bd2 Sort SEE ALSO.
Submitted by:	ru
2005-02-07 08:51:34 +00:00
glebius
c455085275 Document how interaction with ng_ipfw node is configured. 2005-02-05 18:29:03 +00:00
glebius
67c8ae0802 Add a ng_ipfw node, implementing a quick and simple interface between
ipfw(4) and netgraph(4) facilities.

Reviewed by:	andre, brooks, julian
2005-02-05 12:06:33 +00:00
pjd
3c0c7b01b6 - Sort options.
- Put 'break' into separate line.
2005-02-03 21:34:39 +00:00
pjd
1d320aa5ac Fix whitespace. 2005-02-03 21:25:35 +00:00
pjd
492540a830 - Remove bogus O_CREAT flag. We really don't want to create a file here.
PR:		bin/67793
  Submitted by:	Amir Shalem <amir@boom.org.il>

- Sync usage with manual page.

Approved by:	phk
MFC after:	1 week
2005-02-03 13:12:17 +00:00
ssouhlal
d98720feaa Remove unsigned casts.
Discussed with:	delphij, stefanf
Approved by:	grehan (mentor)
2005-01-31 04:45:45 +00:00
ru
d70f40f805 Document -f in usage(). 2005-01-30 13:23:04 +00:00
ru
e68efdc747 Let bsd.prog.mk set SRCS and MAN to their default values. 2005-01-28 16:08:11 +00:00
ambrisko
b7940dca39 Change the ifr_media operation to only get its value and only set
its value once per ifconfig run.  Use Sam's new callback
operation to set it when everything is done.

The purpose for this is that if you did something like
	ifconfig bge0 media 100baseTX mediaopt full-duplex
multiple times it would end up causing the PHY to re-sync
since it would send the IOCTLs:
	ifconfig bge0 media 100baseTX -mediaopt full-duplex
	ifconfig bge0 media 100baseTX mediaopt full-duplex
This would cause the PHY to be updated twice even though
there really wasn't any change since the check in
sys/net/if_media.c would always fail.

Caveat is that this doesn't fix the case of:
	ifconfig bge0 media autoselect
etc. since in sys/net/if_media.c it forces an autoselect to go through
the entire process in ifmedia_ioctl :-( :
          /*
           * If no change, we're done.
           * XXX Automedia may invole software intervention.
           *     Keep going in case the the connected media changed.
           *     Similarly, if best match changed (kernel debugger?).
           */
           if ((IFM_SUBTYPE(newmedia) != IFM_AUTO) &&
                (newmedia == ifm->ifm_media) &&
                (match == ifm->ifm_cur))
                     return 0;

Briefly looked at by:	sam
2005-01-27 16:40:12 +00:00
ssouhlal
cae4e5e935 Get rid of a NULL dereference when oid is too long.
Reviewed by:	keramida
Approved by:	grehan (mentor)
MFC after:	1 week
2005-01-25 14:37:43 +00:00
ssouhlal
5485abc1bb - Make WARNS?= 6 clean
- Add WARNS?= 6

Approved by:	stefanf, grehan (mentor)
2005-01-25 14:28:31 +00:00
delphij
136497ca84 Use new style declarations instead of K&R ones. 2005-01-25 08:40:51 +00:00
delphij
3f5fb9f7fc Use modern style defination for main() and move a extern
declaration to global section.

Bump WARNS?= to 6
2005-01-25 08:37:04 +00:00
delphij
c08fa3f2c0 Code style tweaks: Use static and const where suitable. 2005-01-25 08:24:06 +00:00
delphij
106964bd37 The kernel specified in main() of reboot(8) will be initialized
with -k option and never be used without kflag.  This confuses
gcc because we set "kflag" at the same time with "kernel", but
the logic is not that apparant for gcc.

Since we can initialize "kernel" to NULL then know if "k" option
is set through determining whether it is still NULL, don't try
to have gcc to guess why we are connecting "kflag" with "kernel"
and use "kernel" directly in place of kflag.

Bump WARNS?= from 2 to 6
2005-01-25 08:14:00 +00:00
charnier
ebd0a44c32 spell "file system" correctly
Approved by:	ru
2005-01-24 20:06:16 +00:00
cognet
5f1e82c424 Bring back WARNS to 3 for arm until I figure out how to make gcc happy. 2005-01-24 01:56:06 +00:00
pjd
f7dfd80b65 Allow to specify device size in bytes.
MFC after:	1 week
2005-01-22 20:02:01 +00:00
ru
e83b0dda0a Document -l and -n options in usage(). 2005-01-22 14:37:57 +00:00
ru
08404fcbc6 Polish previous revision:
- Bump document date.
- Spell "file system" properly.
- Add missing markup bits.
2005-01-22 14:36:51 +00:00
wes
926ee6068d Add an option to suppress the creation of the .snap directory in
the new filesystem.  This is intended for memory and vnode filesystems
that will never be fsck'ed or dumped.

Obtained from:	St. Bernard Software RAPID
MFC after:	2 weeks
2005-01-21 22:20:25 +00:00
wes
bb68fc2b6e Improved error checking for existence of a .snap directory to
generate snapshots in when -L is requested.  If the .snap directory
does not exist, or is not a directory, issue a warning and revert
to the non- live behavior.

Obtained from:	St. Bernard Software RAPID
2005-01-21 22:13:25 +00:00
ru
0f1929cc0e Fixed xrefs. 2005-01-21 10:35:40 +00:00
ru
459d10d297 Use the standard section name. 2005-01-18 20:36:37 +00:00
glebius
038ca13cb7 Don't print extra " via ", if we have already printed one. While here,
slightly style brackets.

PR:		misc/75297
MFC after:	1 week
2005-01-18 15:13:20 +00:00
ru
13fe9ea5a2 Sort sections. 2005-01-18 10:09:38 +00:00
delphij
69da99d939 Oops... Remove the line leaked in the last commit which is not
intended to be there...
2005-01-17 14:27:31 +00:00
delphij
3d84f450ff WARNS=6 cleanup:
- Initialize everything in the struct array, not only the mentioned
   ones
 - Unconditionally initialize hs to 0 to avoid repeatly doing so
 - Cast to unsigned int when comparing to unsigned variables.
2005-01-17 14:14:00 +00:00
delphij
f4455c7ee2 WARNS=6 cleanup:
- signed/unsigned conform.
 - Better initialization of nlist[].  I think we should have
   something like NLIST_NULL instead of the current (ugly)
   form...
2005-01-17 13:56:46 +00:00
ru
6cc4b6c220 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
charnier
b1e478129c Remove \n at the end of err(3) strings 2005-01-16 14:37:30 +00:00
pjd
1a16120a14 Fix arguments syntax.
Manual pages fixes by:	ru
MFC after:		3 days
2005-01-15 13:02:50 +00:00
ru
d26afd541d Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
ru
c448d3af70 Fixed display type. 2005-01-15 12:26:29 +00:00
ru
48350e79c1 Fixed display types. 2005-01-15 12:23:35 +00:00
ru
ee49c96852 Markup nits. 2005-01-15 11:21:24 +00:00
ru
1df46a2a90 Markup fixes. 2005-01-15 10:05:02 +00:00
brooks
a7b7255dba Deprecate unmaintainable uses of strncmp to implement abbreviations.
This commit replaces those with two new functions that simplify the code
and produce warnings that the syntax is deprecated.  A small number of
sensible abbreviations may be explicitly added based on user feedback.

There were previously three types of strncmp use in ipfw:
 - Most commonly, strncmp(av, "string", sizeof(av)) was used to allow av
   to match string or any shortened form of it.  I have replaced this
   with a new function _substrcmp(av, "string") which returns 0 if av
   is a substring of "string", but emits a warning if av is not exactly
   "string".

 - The next type was two instances of strncmp(av, "by", 2) which allowed
   the abbreviation of bytes to "by", "byt", etc.  Unfortunately, it
   also supported "bykHUygh&*g&*7*ui".  I added a second new function
   _substrcmp2(av, "by", "bytes") which acts like the strncmp did, but
   complains if the user doesn't spell out the word "bytes".

 - There is also one correct use of strncmp to match "table(" which might
   have another token after it without a space.

Since I changed all the lines anyway, I also fixed the treatment of
strncmp's return as a boolean in many cases.  I also modified a few
strcmp cases as well to be fully consistent.
2005-01-15 01:46:41 +00:00
delphij
0c16fd32cc Improve readability for the recently introduced changes by having
their sizeof(*p) instead of explicitlly specifying their types.

Suggested by:	nectar
2005-01-14 15:49:05 +00:00
delphij
d7e35203c7 Use a better name than underscore-tmpfile for better representation
of the meaning.

Suggested by:	stefanf
2005-01-14 13:18:55 +00:00
delphij
830453071a 64-bit clean + WARNS=6:
- Convert the (char *) cast+cast backs magic to
	  memcpy(3).  Without this, the resulting code
	  is potentially risky with higher optimization
	  levels.
	- Avoid same name when calling local variables,
	  as well as global symbols.  This reduces
	  confusion for both human and compiler.
	- Add necessary casts, consts
	- Use new style function defination.
	- Minor style.Makefile(5) tweak
	- Bump WARNS?= from 0 to 6

** for the aout code: changes are intentionally limited
   to ease maintaince.
2005-01-14 12:22:57 +00:00
pjd
63224016be Connect SHSEC GEOM class to the build. 2005-01-11 18:18:40 +00:00
pjd
8d8363ee39 Introduce a new GEOM class - SHSEC. It provides sharing secret between
the given providers. Without even one of the configured components there
should be no way to get the secret.

Supported by:	WHEEL Sp. z o.o.
		http://www.wheel.pl
2005-01-11 18:06:44 +00:00
delphij
9f0f84e349 Make WARNS=6 happy with our init(8):
- Use more ``const''s where suitable.
	- Define strk() as a static function in global scope.
	  This avoids the "nested extern declaration" warnings.
	- Use static initialization of strings, rather than
	  referring string constants through char *.
	- Bump WARNS from 0 to 6.
2005-01-11 14:34:29 +00:00
ru
c56f1c1871 Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
delphij
88e0265d82 Initialize "he" in DoFile, so savecore(8) is WARNS=6 clean.
Bump WARNS accordingly.
2005-01-10 10:44:56 +00:00
trhodes
d1d9cce816 Fix build on all (hopefully) 64 bit architectures.
Noticed by:	tinderbox
Tested on:	panther
2005-01-09 09:10:24 +00:00
trhodes
933fbb02e8 Use static const char and bump WARNS. 2005-01-08 22:56:08 +00:00
trhodes
26b9d00584 Remove unused variable. 2005-01-08 22:47:10 +00:00