Commit Graph

3876 Commits

Author SHA1 Message Date
gordon
5114761ede Convert fsck and mount to using execvP to find fsck_foo and mount_foo.
This simplifies the code path and makes the default path easy to override
in the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 17:53:48 +00:00
sam
c55d515408 o update for new 802.11 support
o fix channel command so channel - does what the man page says
2003-06-28 06:23:40 +00:00
luigi
131318184e remove extra whitespace and blank lines 2003-06-27 17:18:14 +00:00
sam
ca22b80a4f o correct mode request handling
o add 802.11 alias support
o suppress display of the default "mode autoselect" when showing the "phy mode"
2003-06-25 15:05:17 +00:00
ru
c243877a3d The current recommended default time to live (TTL) for the Internet
Protocol (IP) is 64 [RFC791, RFC1122].

Prodded by:	Igor Kucherenko <kivvy@sunbay.com>
Obtained from:	http://www.iana.org/assignments/ip-parameters
2003-06-25 13:02:18 +00:00
luigi
16c5708a08 remove unused file (RELENG_5 and above use ipfw2, the old ipfw1
has been unused and unmaintained for a long time).
2003-06-24 07:10:13 +00:00
luigi
f71f9df706 Split some long lines to fit 80 columns (the code in RELENG_4
was already correct).
2003-06-23 22:32:14 +00:00
luigi
7d1080fe33 syntactic sugar: support range notation such as
1.2.3.4/24{5,6,7,10-20,60-90}
for set of ip addresses.
Previously you needed to specify every address in the range, which
was unconvenient and lead to very long lines.
Internally the set is still stored in the same way, just the
input and output routines are modified.

Manpage update still missing.

Perhaps a similar preprocessing step would be useful for port ranges.

MFC after: 3 days
2003-06-23 08:20:28 +00:00
maxim
26c6b0e718 o Fix sets of rules usage example.
PR:		docs/53625
Submitted by:	Kostyuk Oleg <cub@cub.org.ua>
MFC after:	1 week
2003-06-23 07:48:32 +00:00
luigi
a2349d5298 Add support for multiple values and ranges for the "iplen", "ipttl",
"ipid" options. This feature has been requested by several users.
On passing, fix some minor bugs in the parser.  This change is fully
backward compatible so if you have an old /sbin/ipfw and a new
kernel you are not in trouble (but you need to update /sbin/ipfw
if you want to use the new features).

Document the changes in the manpage.

Now you can write things like

	ipfw add skipto 1000 iplen 0-500

which some people were asking to give preferential treatment to
short packets.

The 'MFC after' is just set as a reminder, because I still need
to merge the Alpha/Sparc64 fixes for ipfw2 (which unfortunately
change the size of certain kernel structures; not that it matters
a lot since ipfw2 is entirely optional and not the default...)

PR: bin/48015

MFC after: 1 week
2003-06-22 17:33:19 +00:00
iedowse
6bb0e5cb46 Replace the code for reading and writing the kernel message buffer
with a new implementation that has a mostly reentrant "addchar"
routine, supports multiple message buffers in the kernel, and hides
the implementation details from callers.

The new code uses a kind of sequence number to represend the current
read and write positions in the buffer. This approach (suggested
mainly by bde) permits the read and write pointers to be maintained
separately, which reduces the number of atomic operations that are
required. The "mostly reentrant" above refers to the way that while
it is now always safe to have any number of concurrent writers,
readers could see the message buffer after a writer has advanced
the pointers but before it has witten the new character.

Discussed on:	freebsd-arch
2003-06-22 02:18:31 +00:00
brueffer
2b56b8c409 Remove another reference to ffsinfo.8 2003-06-17 22:47:11 +00:00
brueffer
e910852082 Remove references to ffsinfo(8) for now. It was disconnected from
the build almost a year ago.
2003-06-17 19:21:43 +00:00
sobomax
93123acec5 Xref police: chmod(8) -> chmod(1). 2003-06-17 09:53:03 +00:00
phk
ec4f0cbd37 Compile sunlabel on all archs. 2003-06-17 09:12:42 +00:00
maxim
5a341ceea0 o Pass a correct argument to printf(3).
PR:		bin/51750
Submitted by:	Vasil Dimov <vd@datamax.bg>
MFC after:	2 weeks
2003-06-16 09:44:53 +00:00
rwatson
0980582084 Tighten up the string->integer conversion in sysctl(8):
(1) Reject zero-length strings for CTLTYPE_INT, _UINT, _LONG,
    _ULONG.  Do not silently convert to 0.

(2) When converting CTLTYPE_INT, _UINT, _LONG, and _ULONG, check the
    end pointer generated by strtol() and strtoul() rather than
    discarding it.  Reject the string if either none of the string
    was useful for conversion to an integer, or if there was
    trailing garbage.

I.e., we will not allow you to set a numeric sysctl to a value unless
we can completely convert the string argument to a numeric value.
I tripped over this when I put the following in /etc/sysctl.conf:

   kern.maxfiles="4000"

Ouch.
2003-06-15 06:26:08 +00:00
ken
a69cc262ba Remove MAINTAINER= lines in the makefiles for camcontrol, iostat, libcam
and libdevstat, since the new way of doing things is to just list
maintainership in src/MAINTAINERS.

Also, remove duplicate entries in src/MAINTAINERS for those utilities.  I
already had entries for them.
2003-06-14 05:28:01 +00:00
ru
50a7b0b9b4 If the -proxy_only option is used, the -alias_address/-interface
options are not required.

Suggested by:	Vaclav Petricek
MFC after:	2 weeks
2003-06-13 22:15:42 +00:00
grog
8a674eedf4 Remove label command. It has been deprecated since December 1998, and
recent changes broke it altogether.

Prompted by:  phk
2003-06-12 05:55:59 +00:00
grog
4af2cae35c Remove "label" keyword. 2003-06-12 05:54:53 +00:00
obrien
5796c98c6a style clean. 2003-06-11 23:24:31 +00:00
rwatson
057b61aa1c Add "-n" argument, which causes mdconfig to simply print the unit
number X, rather than mdX, making it easier to script tests that
use md devices but don't want to make assumptions about any existing
md use (such as in diskless environments).
2003-06-11 06:38:24 +00:00
phk
a93c01968a Be consistent about module names. 2003-06-09 21:50:41 +00:00
phk
3bba46e45a GEOMification of CCD.
You need your kernel and ccdconfig(8) to be in sync, particularly if your
source tree is on a ccd device.
2003-06-09 19:25:07 +00:00
jmallett
6cb7abd918 Marshal newfs -L (filesystem volume names), the names are not marshalled
with any quoting, but that should be OK for re-input, regardless.
2003-06-09 09:26:02 +00:00
charnier
ac0a573e87 .Nm -> .Xr 2003-06-08 12:57:39 +00:00
charnier
86207fee28 The .Xr utility 2003-06-08 12:55:55 +00:00
charnier
38dd1b1ac3 mount_msdos -> mount_msdosfs 2003-06-08 12:53:07 +00:00
charnier
7aed4eadc7 Add section number to .Xr 2003-06-08 12:51:28 +00:00
charnier
eeb46390af Add section number to .Xr 2003-06-08 12:40:50 +00:00
phk
d25df9535b Augh! Fix the sparc64 build:
If we don't have a default label location for the compiled architecture,
insist that a -m <architecture> option is specified.
2003-06-07 22:02:01 +00:00
phk
10afeb8271 Sanitize setting of labeloffset and labelsector. 2003-06-07 09:09:39 +00:00
guido
2036547e59 Move my maintainership of parts of ipfilter back to Darren Reed 2003-06-06 11:30:50 +00:00
phk
56091404e8 Give ia64 the exact same semantics as i386 with respect to non-512
byte sector devices.
2003-06-04 05:25:04 +00:00
marcel
781a492a3e Unbreak ia64. 'nuff said. 2003-06-04 02:01:05 +00:00
ticso
bb00c59c79 Change handling to support strong alignment architectures such as alpha and
sparc64.

PR:		alpha/50658
Submitted by:	rizzo
Tested on:	alpha
2003-06-04 01:17:37 +00:00
phk
52a564bd3f Further devilification of CCD:
Change the list interface to simplify things.
Remove old list ioctls which bogusly exported the softc to userland.
Move the softc and associated structures from the public header to
the source file.
2003-06-02 21:29:04 +00:00
phk
ca0770e1dd Use GEOM OAM api to retrive list of configured ccd devices.
Link against libgeom.
2003-06-02 20:50:59 +00:00
phk
2550ebdaa6 Fix sectorsize != 512 on i386 and pc98. Add test cases for same. 2003-06-02 14:19:31 +00:00
ru
683fd8c50f Assorted mdoc(7) fixes. 2003-06-02 11:19:24 +00:00
maxim
c98e04ea6e Fix SIGINFO handling: do not print incorrect timing statistics
when the data for it is not available.

Founded by:	ping -s0 localhost; press ^T
2003-06-02 10:01:59 +00:00
phk
069191fcbf Simplify the GEOM OAM api: Drop the request type, and let everything
hinge on the "verb" parameter which the class gets to interpret as
it sees fit.

Move the entire request into the kernel and move changed parameters
back when done.
2003-06-01 13:47:51 +00:00
phk
f1c49df79e Add pc98 arch to test set.
Remove ktrace which leaked out of test-setup.
2003-06-01 09:30:53 +00:00
obrien
a3c77bad15 Protext copyright[]. 2003-05-31 15:42:56 +00:00
ru
8bc4d4bba7 mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-24 19:53:08 +00:00
peter
4597dace1f Add amd64 to the MACHINE_ARCH list of systems that link bsdlabel to
disklabel.  I just got burnt again by having an old disklabel binary
kicking around.

Discussed with: phk
Approved by:    re (safe amd64 stuff)
2003-05-23 06:08:28 +00:00
dougb
90267b2854 When newfs'ing a partition with UFS2 that had previously been newfs'ed
with UFS1, the UFS1 superblocks were not deleted. This allowed any
RELENG_4 (or other non-UFS2-aware) fsck to think it knew how to "fix"
the file system, resulting in severe data scrambling.

This patch is a more advanced version than the one originally submitted.
Lukas improved it based on feedback from Kirk, and testing by me. It
blanks all UFS1 superblocks (if any) during a UFS2 newfs, thereby causing
fsck's that are not UFS2 aware to generate the "SEARCH FOR ALTERNATE
SUPER-BLOCK FAILED" message, and exit without damaging the fs.

PR:		bin/51619
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
Reviewed by:	kirk
Approved by:	re (scottl)
2003-05-22 18:38:54 +00:00
ru
4f7eb6b57a mdoc(7) fixes: Fixed the markup in the BUGS section, bumped document date. 2003-05-19 20:03:28 +00:00
ru
5b41631f95 mdoc(7) fixes: Fix the markup in the recently added ENVIRONMENT section. 2003-05-19 19:58:29 +00:00
ru
20090fa201 mdoc(7) fixes: Mark "gated" with the .Nm macro.
Approved by:	re (blanket)
2003-05-19 19:54:00 +00:00
ru
a3c7eaf965 Add a newline at end of file.
Approved by:	re (blanket)
2003-05-19 19:52:29 +00:00
ru
5a893bc465 Fixed troff(1) and mdoc(7) warnings.
Approved by:	re (blanket)
2003-05-18 21:05:22 +00:00
brueffer
01516ccfd4 Clarify setting sysctl variables via loader(8) tunables
* s/can not/cannot/

Submitted by:	ru (*)
Approved by:	re (rwatson)
2003-05-18 00:27:02 +00:00
ru
6f280e5374 mdoc(7) markup overhaul. 2003-05-17 22:53:44 +00:00
ru
cafeaf7f6f Fixed the markup in the recently added ENVIRONMENT section. 2003-05-17 22:35:35 +00:00
ru
314fef9f45 mdoc(7) fix: Add the forgotten paragraph command.
Approved by:	re (blanket)
2003-05-17 22:31:48 +00:00
ru
f05c138670 mdoc(7) fixes: Expand contraction. 2003-05-17 22:21:27 +00:00
peter
ecadd4f845 Add fdisk for $MACHINE_ARCH == amd64 2003-05-17 20:40:42 +00:00
ru
b0ddc74ad2 Style fixes.
Reviewed by:	phk
Approved by:	re (scottl)
2003-05-17 19:06:45 +00:00
ru
7ffefb5839 Moved libgeom.so dependencies to where they belong.
Reviewed by:	phk
Approved by:	re (scottl)
2003-05-17 19:05:17 +00:00
brueffer
f8918f9a1c Add information about setting sysctl variables via loader(8) and
loader.conf(5)

PR:		38426 (slightly modified)
Submitted by:	Phil Pennock <pdp@nl.demon.net>
Approved by:	re (bmah)
MFC after:	3 days
2003-05-17 01:01:03 +00:00
imp
e01c3427e3 Allow zero or more actions in an action list, rather than requiring
one or more actions in the list.  This makes constructs like:

attach 10 {
//	echo "Driver $device_name attached"
};

to be accepted by the parser.  It will be treated as if the user had
entered:

// attach 10 {
//	echo "Driver $device_name attached"
// };

(eg totally ignored).

Approved by: re@ (rwatson)
2003-05-15 02:23:32 +00:00
ru
eab4e2ef45 mdoc(7) police: fix more breakages from rev. 1.69. 2003-05-14 16:22:16 +00:00
phk
3b9288c6f4 Add pc98 archtecture entry.
Approved by:	re/rwatson
2003-05-13 19:42:52 +00:00
sheldonh
416ef089cb Fix broken comment line introduced in rev 1.69.
Found with:	nroff -mandoc ifconfig.8 > /dev/null
2003-05-13 08:29:49 +00:00
trhodes
4d1d8c7d9a Remove -p from getopt args.
PR:		37221
Submitted by:	Joshua Goodall <joshua@roughtrade.net>
Reviewed by:	rwatson
Approved by:	re (jhb)
2003-05-12 19:48:47 +00:00
grog
57b595dfe1 Understand GEOM. This makes growfs work again, but it really needs rewriting.
Submitted by: 	Lukas Ertl <l.ertl@univie.ac.at>
Approved by:	re (scottl)
2003-05-12 05:37:16 +00:00
trhodes
401cae2acb Remove remnants of the -p option. While I'm here, remove wording about
-P which could be interpreted as 'this option must be specified'.

PR:		37221 && 51886
Discussed with:	bmah
Approved by:	re (blanket)
2003-05-11 00:38:58 +00:00
iedowse
9e09746efa Put back the error checking in wtfs() that was lost when newfs was
changed to use libufs in revision 1.71. Without this, any write
failures in newfs were silently ignored.

Note that this will display a meaningless errno string in the case
of a short write as opposed to a write error, since bwrite()'s
return value does not allow the caller to determine if errno is
valid.

Reported by:	Lukas Ertl <l.ertl@univie.ac.at>
Reviewed by:	jmallett
Approved by:	re (bmah)
2003-05-10 18:58:17 +00:00
phk
c4e628afb8 Before reading an ascii label, initialize with defaults so that
getasciipartspec() has a sectorisize in case it needs one.

Approved by:	re/jhb
2003-05-09 20:26:17 +00:00
phk
769c145dbe Sigh, this shows just how much one can be conditioned my the environment:
Just because we for the last ten years have fought for every byte
in the boot code on i386, doesn't mean that other architectures could
not actually have space to spare there.

Remore debugging message.
2003-05-09 19:07:59 +00:00
trhodes
b193faf369 Describe the pattern filenames must be in before they are added to the hints
file.

PR:		46271
Approved by:	re (blanket)
2003-05-08 17:25:41 +00:00
grog
3cb479005e vinum_read: Don't lock configuration from userland. If vinum(8)
crashes, the config remains locked and causes all
            subsequent start or read attempts to fail.  This is part
            of a fix for the recently reported hangs.

Approved by:  re (scottl)
2003-05-08 00:33:57 +00:00
hmp
380770fd3a Bring the dumpon(8) man page closer to reality:
- dumpon utility has not used kern.dumpdev sysctl
      since rev. 1.14 (sbin/dumpon/dumpon.c) when phk@
      updated it to use the DIOCSKERNELDUMP ioctl [1]
    - remove obsolete reference to sysctl(3)

While I am there, fix two style nits:

    - use .Nm instead of `dumpon'
    - change NOTES to IMPLEMENTATION NOTES, to bring
      it in line with recommended section headings in
      mdoc(7)

Original patch by: Martin Faxer <gmh003532brfmasthugget.se> [1]

PR: docs/39293
Approved and Reviewed by: des (mentor), re (scottl, bmah)
2003-05-07 19:37:51 +00:00
mckusick
2e1c393dfc Dump is hard-wired to believe that it can read disks on
1024-byte boundaries. For many years this was a reasonable
assumption. However, in recent years we have begun seeing
devices with 2048-byte sectors. These devices return errors
when dump tries to read starting in the middle of a sector
or when it tries to read only the first half of a sector.
Rather than change the native block size used by dump (and
thus create an incompatible dump format), this fix checks
for transfer requests that start and/or end on a non-sector
boundary. When such a read is detected, the new code reads
the entire sector and copies out just the part that dump
needs.

Reviewed by:	Poul-Henning Kamp <phk@critter.freebsd.dk>
Approved by:	re (John Baldwin <jhb@FreeBSD.org>)
Sponsored by:   DARPA & NAI Labs.
2003-05-07 18:27:09 +00:00
dougb
0dc19dc486 Add an example of how to create an fstab entry. 2003-05-05 23:41:17 +00:00
obrien
df429f4699 Centralize _PATH_* definitions.
Submitted by:	Tim Kientzle <kientzle@acm.org> (embellished by me)
2003-05-05 22:49:23 +00:00
phk
fe7b626383 Compile bsdlabel on all platforms.
Install a link to the disklabel(8) name on i386 and alpha platforms.

Leave old disklabel(8) sources intact but disconnected from the build
for now.
2003-05-05 21:28:08 +00:00
phk
1e484c95bf Typo in last commit.
Spotted by:	mbr
2003-05-05 16:33:43 +00:00
phk
f7f144ba21 Add a BUGS section which explains that & why vinum volumes can not be
encrypted with gbde(8).
2003-05-05 16:18:58 +00:00
sos
5e7892f0e3 DOnt allow getting caps from other than master and slave device :) 2003-05-05 10:28:37 +00:00
grog
d4c2dfcea2 vinum_start: Call vinum_read with correct number of parameters. 2003-05-05 08:33:36 +00:00
grog
933dd0f26d vinum_readpol: Get this right.
Submitted by:	Allan Saddi <allan@saddi.com>

vinum_read: White space cleanup.
2003-05-05 05:27:19 +00:00
grog
cb86eeb7a1 Finally implement read policies. The previous "implementation" didn't
work because it referred to plexes which were almost invariably when
referred to.  Instead, deprecate the "prefer" keyword for volumes
(though it's still there for the moment) and add a keyword "preferred"
to the plex definition.  The relationship is like this:

Old:

  vol foo ... prefer foo.p3

New:

  plex foo.p3 volume foo preferred

printconfig: Print out the "preferred" keyword for plexes where
	     appropriate.

	     Still print out "prefer" for volumes.  The kernel module
	     continues to accept this version, but it's probably not
	     going to live much longer.
2003-05-05 05:25:49 +00:00
phk
1067d41da3 Add transparent handling of mbroffset for backwards compatibility. 2003-05-04 19:27:22 +00:00
sos
33aa8ec186 Added more descriptive error outputs.
PR:	46096
2003-05-04 09:51:06 +00:00
sos
0383b05a47 On getting status print the stripesize on RAID0's. 2003-05-04 09:28:43 +00:00
murray
c57f9f9325 Note that gated is a commercial routing product now, and remove
references to it's man page, which is almost never installed on a
FreeBSD system.  The information about using this command with gated
has been retained.  I have just made it clear that gated is not a part
of FreeBSD.

PR:		docs/51407
2003-05-04 06:13:25 +00:00
grog
7d3e9c3779 Rewrite of startup code:
vinum_read:
  Accept 0 parameters, hand an empty string to the kernel if so.
  Use new ioctl VINUM_READCONFIG, not VINUM_CREATE, to read config.

vinum_start: When passed 0 parameters, drop the devstat kludge and
     call vinum_read instead.  It's no longer necessary to distinguish
     between "start" and "read" if no parameters are passed, and
     probably one of them should go away.
2003-05-04 05:13:17 +00:00
ru
00405b339c Fix the misspelling of DPADD, then fix "make checkdpadd". 2003-05-03 19:49:05 +00:00
obrien
19105c8312 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
phk
a3b8d0b40b More axe-work:
Hide all the historical fields of the label, unless people ask for them with -A,
set them to intelligently chosen defaults otherwise.

Distill the manual page to remove inaccuracies, misundertandings and obsolete
information.  It can probably still be done better but now at least it is
not misinforming people.
2003-05-03 09:58:20 +00:00
phk
51336ad9ea Some minor remodelling with a large axe. 2003-05-03 09:02:27 +00:00
phk
2d603e9073 Use new geom.ctl based OAM instead of ioctls.
Various cleanup.
2003-05-03 08:04:24 +00:00
phk
023c16ae05 bsd_disklabel_le_dec() takes an extra argument now. 2003-05-02 22:46:44 +00:00
phk
283a9b563b Vastly simplify architecture handling: Use properties of label as
recorded in global variables, rather than checks on the architecture.

Drop horribly code to handle MBR/PC98's embedded in the BSD label area.
If you need to have an MBR or PC98 on your disk, you should not overlap
it with a BSDLABEL, if you don't need it, this code is nothing but trouble.
2003-05-02 20:14:48 +00:00
phk
da6f75bd54 Default the location to the compiled for architecture if no -m arg specified. 2003-05-02 20:02:11 +00:00
phk
55aa7c2b5c Add three global variables which contain the location, size and a flag
for the alpha checksum, and set them depending on the specified architecture

Don't look for disklabels every 16 bytes, look the only place they should
be for the current architecture.

Always read the label from the raw disk and decode it into struct
disklabel rather than trust a cast from random addresses.

When writing to the raw disk, encode the label properly.
2003-05-02 19:58:08 +00:00
phk
865a4611c8 Pull in geom_bsd_enc.c from sys/geom to encode and decode our labels. 2003-05-02 19:54:18 +00:00
phk
872854ec00 Remove the well-intentioned, but ill thought out check which prevents us
from dd(1)'ing the boot code off one drive and have bsdlabel write it
on another.
2003-05-02 19:14:38 +00:00
phk
cf0500a874 Update the test-script based on the sunlabel version, but put a for-loop
in there to run over the various architectures.
2003-05-02 19:12:20 +00:00
imp
0016700b2e sysctlbyname takes a size_t as its 5th argument, not a pointer.
However, since NULL was used, and this is C++, this error went
undetected until g++ 3.3 somehow managed to whine about it.

Reported by: obrien
2003-05-02 17:38:08 +00:00
sos
282348e1fa Add "addspare" functionality. 2003-05-02 12:42:31 +00:00
obrien
baba414b75 bufpos is used in size_t contexts, so make it one. 2003-05-02 07:08:52 +00:00
obrien
9680dcd33d Set WARNS=1. RESOLUTION_MAX macro has major signed/unsigned issues. 2003-05-02 06:56:32 +00:00
obrien
91e854c20e Use __FBSDID. 2003-05-02 06:49:10 +00:00
obrien
e21b490b41 Use size_t type vars in sizeof contexts. 2003-05-02 06:46:24 +00:00
ru
f3e97543a1 Removed all vestiges of KerberosIV. 2003-05-01 21:18:36 +00:00
ru
8716bb50e3 Style. 2003-05-01 21:10:37 +00:00
ru
82fa70c065 Fixed the MLINKS assignment style. 2003-05-01 20:35:30 +00:00
markm
4a635f887e De-Kerberise (KerberosIV). KerberosIV is no longer present, and
remote backups can still be done with Kerberos authentication using
SSH and Kerberos 5.
2003-05-01 20:09:58 +00:00
nyan
c7b799cc91 Oops, DIOCGPC98 should be DIOCSPC98. 2003-05-01 14:30:59 +00:00
nyan
327c5ea640 Merged from src/sbin/fdisk/Makefile revision 1.10. 2003-05-01 13:53:41 +00:00
nyan
33a268f422 Merged from src/sbin/fdisk/fdisk.c revision 1.69. 2003-05-01 13:27:11 +00:00
grog
2d8975b7db Remove VINUMDEBUG. vinum(8) always compiles with VINUMDEBUG to be able
to cope with kernel modules with VINUMDEBUG.
2003-05-01 07:19:29 +00:00
grog
beb0ffad0f Add the #includes previously in individual .c files.
Change name of history file to History to avoid name conflicts.
2003-05-01 01:40:16 +00:00
grog
f8a75224c1 Move most #includes to vext.h.
Change name of history file to History to avoid name conflicts.

Don't try to make devices unless devfs has been removed.

Don't accept resetconfig command from a file.

Abused by:  Jens Schweikhardt <schweikh@schweikhardt.net>

Remove dead code (#if 0)

vinum_mirror: Don't try to create mirrors with 0 drives.

Found by: mismatch between enum kw in two different files.
2003-05-01 01:39:49 +00:00
grog
a2e7e1d3dd Move most #includes to vext.h.
Change name of history file to History to avoid name conflicts.

Rewrite minor number decoding.  Now we have only three types of
object: subdisks, plexes and volumes.  The encoding for plexes and
subdisks no longer reflects the object to which they belong.  The
super devices are high-order volume numbers.  This gives vastly more
potential volumes (4 million instead of 256).

Don't try to chown directories if they haven't been created.
2003-05-01 01:39:42 +00:00
grog
204977daef Move most #includes to vext.h.
vinum_info: Use increasing verbosity to show time spent in disk
	    driver.

Correct a comment.
2003-05-01 01:38:55 +00:00
harti
7cb80f0d91 Add media types and options for ATM. While on most ATM cards media cannot
be changed, it is very convenient to be able to toggle SDH/Sonet,
idle/unassigned cells and scrambled mode and to see the carrier
state.

Reviewed by:	-arch (if_media.h definitions)
2003-04-29 17:23:23 +00:00
sam
d260ea9c32 document mode directive 2003-04-28 16:47:40 +00:00
sam
1e1e2faff9 add a "mode" directive to specify the operating mode for multi-mode devices;
this is mostly intended for use with multi-mode 802.11 devices that support
some combination of 11a, 11b, and 11g
2003-04-28 16:37:38 +00:00
tjr
12e53fb981 This file does not seem to serve any purpose. It has never been hooked up
to the build, and performs a subset of the functionality that the getconf(1)
utility performs.
2003-04-28 00:38:48 +00:00
jake
2121b92fc7 Fix for dynamic linking.
Submitted by:	Alex Deiter <tiamat@komi.mts.ru>
2003-04-27 21:24:05 +00:00
dougb
e1acb7b583 Add .Xr's to mdmfs(8).
Submitted by:	Scot W. Hetzel <hetzels@westbend.net>
2003-04-27 01:46:56 +00:00
dougb
80c5ac0d0c Also MLINK the man page for mount_mfs. 2003-04-27 01:40:45 +00:00
dougb
150c8b2f26 Install a mount_mfs symlink so that you can specify something like this
in /etc/fstab to get a memory disk:

md                      /tmp            mfs rw,-s8m,noatime     2       2

Back when mdmfs was created, there was vague discussion about doing this, but
it never materialized.

Reminded by:	Ralf S. Engelschall <rse@engelschall.com>
2003-04-27 01:18:36 +00:00
imp
9f864f962e Create a new C++ header file called devd.hh which has all the class
definitions in it.  Begin to document the classes that we use, and how
they interrelate (using comments that I can use with doxygen to
automatically generate docs with).
2003-04-26 20:59:04 +00:00
imp
02bfd4df0a Update to use is_id_char() in the last patch. I should have done this
before the last commit.
2003-04-26 20:25:40 +00:00
imp
5e747a109f Make better use of the string type when parsing things. This switches
expand one from using a fixed buffer to using a string which
dynamically allocates these things.

Submitted by: green@ (against an earlier version of devd)
Ignored for too long by: imp
2003-04-26 19:44:45 +00:00
schweikh
8515af8eea Fix typos in comments; some style(9) fixes; no code changes.
PR:	misc/50979
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
2003-04-26 15:22:29 +00:00
imp
71f3be54cc Change default to be 'process all events before calling daemon.'
Also, put a small work around into devd to prevent a hang on boot this
would cause because select used to return 2 rather than 0 for no
evetnts due to a bug I fixed a few days ago in subr_bus.c.  I'll
remove this workaround May 7th.  You have until then to upgrade your
kernel if you want to run a new devd with an older kernel.
2003-04-25 02:13:42 +00:00
jmallett
a521aa5aa4 Back out previous delta to fix fsck on filesystems without an fstab entry,
where we want to take the disklabel filesystem type of "4.2BSD" and use
fsck_4.2bsd on those filesystems.

Add a comment about why the code is there, now that we know:

         * XXX This is a kludge to make automatic filesystem type guessing
         * from the disklabel work for "4.2BSD" filesystems.  It does a
         * very limited subset of transliteration to a normalised form of
         * filesystem name, and we do not seem to enforce a filesystem
         * name character set.
2003-04-25 01:12:35 +00:00
johan
f0e2ab20a0 style(9): use NULL when assigning/comparing a char *,
consitently compare fileid with 0 using == and !=.

Reviewed by:	silence on @audit
2003-04-23 20:33:57 +00:00
johan
4c6fe8967c Make this WARNS=5 clean by adding () in 'if (a || (b && c))'.
Look at by:	sebastian.ssmoller@web.de on audit@
2003-04-23 20:26:21 +00:00
johan
1bab2ea14b Make this WARNS=5 clean by using %j and (uintmax_t).
Look at by:	sebastian.ssmoller@web.de on audit@
2003-04-23 20:24:13 +00:00
johan
e567096f00 These are WARNS=5 clean, mark them as such to keep them that way.
Look at by:	sebastian.ssmoller@web.de on audit@
2003-04-23 20:22:33 +00:00
phk
f00eb2c09f Add testcases to ensure that overwriting bootcode does not trash label. 2003-04-23 08:25:44 +00:00
phk
47ef37e7e2 If we cannot open the parent device for writing, use GEOM::CONFIG_GEOM
requests to write label and bootcode.

The -r argument is ignored (with a warning).

With a lot of help from:	jake
2003-04-23 08:25:20 +00:00
phk
1084635f08 Do not link sunlabel to disklabel. 2003-04-23 06:37:57 +00:00
phk
00bb631612 Add "-r" when we initialize the label first time.
Add two more tests.
2003-04-22 21:04:48 +00:00
johan
3cd76cb1f7 Make this WARNS=2 clean by using %j and (uintmax_t).
Reviewed by:	tjr@ on audit@
Approved by:	silence from sos@
2003-04-22 19:57:46 +00:00
phk
ea17f6289a Use explicit encoding/decoding funtions for sunlabel data structures.
Use #defines for various magic numbers.

Attach test-case to makefile.

Reviewed by:    jake
2003-04-21 20:38:15 +00:00
phk
38d3139e70 Add minimal regression test for hotspot handling of the sunlabel. 2003-04-21 20:16:07 +00:00
imp
3a058512c4 Kill debug printf that crept in my last commit 2003-04-21 17:25:39 +00:00
imp
037b7ed675 Implement a two new flags, and change the meaning of another one.
'd': now means don't do daemon().
'D': Debug
'n': Don't wait to process all pending events before calling daemon.

In the past, devd would call daemon immediately.  However, this causes
a race.  If anything in the boot process depends on configuring the
devices configured by devd, maybe they would be configured in time,
maybe not.  Now we don't call daemon until all pending events are
processed, unless -n is specified.

# -n is actually the default for a while due to the select(2) bug in devctl
# that I just fixed to give people a chance to upgrade.
2003-04-21 06:26:08 +00:00
imp
6968b9e7d3 Put an anti-foot-shooting measure in place. Set hw.bus.devctl_disable
to 0 when we startup.  Print a warning in this case.  This allows
people that are playing with devd by hand to have something happen.
Otherwise, it appears that devd isn't working because /dev/devctl is
disabled and producing no events.

Suggested by: peter on irc a long time ago.
2003-04-21 04:30:12 +00:00
imp
304876f035 o Skip white space between variables better. This makes
'a="b" c="d" at loc=1 on busN' properly set 'c' and process the rest of
  the stirng.  Before it would ignore everything after variable 'a'.
o Parse nomatch and other events differently.  They are more different
  than the code allowed for, so we weren't properly parsing nomatch
  events.  It appears this fixes some of the demand loading issues that
  I was having with devd.

Noticed by: Gary Palmer
2003-04-21 04:00:01 +00:00
imp
16d8142975 devd.conf already has the examples in the todo list 2003-04-21 03:29:53 +00:00