Commit Graph

4057 Commits

Author SHA1 Message Date
harti
fb2139bef8 Get rid of a __DECONST by strdup'ing the string in question. When
called this way the program just prints its help intro, so the
memory leak is not a problem.

Pointed out by: bde
2003-08-20 08:25:36 +00:00
obrien
36f2112c2d style.Makefile(5) 2003-08-18 15:35:18 +00:00
obrien
3f57daa44e Restore vendor ID's.
Requested by:	bde
2003-08-18 15:32:16 +00:00
gordon
2d695adb5d At imp's request, force devd to be statically compiled. This avoids the
need for libstdc++ in /lib, and the generated binary is actually smaller
statically linked than dynamically + sizeof(libstdc++). Additionally,
devd doesn't use get*by*() which is one of the main motivations for
dynamically linking your root partition anyway.
2003-08-17 08:40:49 +00:00
gordon
ccbdb60357 Stage 4 of dynamically linked root support. Add a big knob,
WITH_DYNAMICROOT, which will toggle the generation of dynamically-linked
binaries for installation in /bin and /sbin. It is currently off,
meaning that /bin and /sbin are still statically linked by default.

If something goes wrong (which I hope doesn't), this is what /rescue is
all about. Please do not try to use WITH_DYNAMICROOT and NO_RESCUE to
save space or some other equally silly reason. If you do and end up
having problems, you have been warned.
2003-08-17 08:37:47 +00:00
rwatson
1c36a8c9b2 Hook up ffsinfo(8). 2003-08-14 18:55:57 +00:00
rwatson
dbbfa34784 Commit 1 of 2 to fix ffsinfo(8) for UFS2.
Update ffsinfo(8) to use new UFS2 support in the growfs(8) debugging
functions.  Largely consists of renaming fields and types to be aware
of the UFS1/UFS2 distinction, relying on libufs(3) to open and sanity
check the device/file/label accessed.

Since libufs(3) now handles label/UFS interactions, remove -L argument.

Note: when submitted, this patch had substantial style changes.  I've
attempted to remove the restyling from the patch to separate the
functional and style changes.

Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
PR:		bin/53517
2003-08-14 18:55:31 +00:00
ume
dd697f7f1d support poll(2).
Obtained from:	KAME
MFC after:	1 week
2003-08-14 18:43:57 +00:00
rwatson
596e85878f Commit 1 of 2 to fix ffsinfo(8) for UFS2.
Add support for UFS2 to the UFS debugging routines in growfs; required
to update ffsinfo(8) for UFS2.  A variety of types and fs variables are
renamed to reflect UFS1/2 structures.  Also, the print routines for
inodes are now split into separate UFS1 and UFS2 versions.  We now
define dbg_dump_csum_total(), but lose the printing of rotational
information since that's not present in UFS2.  In the future, we may
want to re-add this functionality to print it solely for UFS1.

Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
PR:		bin/53517
2003-08-14 18:40:59 +00:00
ru
a25f0a15bd - Clarify the port range syntax in -redirect_port.
PR:	docs/46286

- "IP number" -> "IP address", for consistency.
2003-08-13 15:13:33 +00:00
ru
2ef02cd9c8 Added an option to specify an alternate PID file.
PR:		bin/37159
Submitted by:	"Aleksandr A. Babaylov" <.@babolo.ru>
2003-08-13 13:16:19 +00:00
trhodes
91d6aa19c6 Add a '-M mask' option so that users can have different
masks for files and directories.  This should make some
of the Midnight Commander users happy.

Remove an extra ')' in the manual page.

PR:		35699
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru> (original version)
Tested by:	simon
2003-08-12 20:06:56 +00:00
ceri
f756e0eba1 Correct a grammatical error. 2003-08-12 20:01:10 +00:00
harti
6f042896db Add a program for configuration of the ATM drivers and the IP over ATM
stuff. This utility allows inspection of the ATM characteristics,
the PHY layer, including statistics of both, the retrival of the
list of currently open channels and also allows access to utopia(4).
2003-08-12 14:25:57 +00:00
harti
0a8e1983d3 Add the new arguments for the add pvc command to the help information.
Correct a comment.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	3 days
2003-08-11 07:14:10 +00:00
mbr
0be8a604fb Turn the annoying and long error message off. It was so
long that it was even hard to find the real error cause.

Requested by:	rwatson
2003-08-09 20:36:06 +00:00
bms
54c68aefe1 PR: docs/53688
Submitted by:	bms
Approved by:	jake (mentor)
2003-08-09 04:07:42 +00:00
johan
cfa90ba606 Make this WARNS=6 clean by prototyping 'usage'.
Tested by:	make universe
2003-08-08 19:51:01 +00:00
johan
e8cab37866 Make this WARNS=6 clean by renaming the variable 'err' to 'error'
in order not to shadow err(3).

Tested by:	make universe
2003-08-07 19:10:35 +00:00
imp
72cdd135e5 Prefer PATH_MAX to MAXPATHLEN. Both contain the trailing NUL, so
remove the unneeded +1.
2003-08-07 05:38:56 +00:00
imp
5dab8f4ced No need to define optind as an extern. stdlib.h does that for us. 2003-08-07 04:53:48 +00:00
imp
a34be66702 Prefer PATH_MAX to MAXPATHLEN. PATH_MAX has the trailing NUL. 2003-08-07 04:51:41 +00:00
imp
1eb290e3db MAXPATHLEN includes the trailing NUL, so no need to add 1 here. 2003-08-07 04:50:29 +00:00
ache
81b7fd33bb Localize 'ls' output
Don't set 8bit in quote processing
2003-08-06 08:46:21 +00:00
yar
82d0fb1cec Don't reinvent the wheel: Use setmode(3) to interpret
a file mode specification from the command line.  This
approach is more flexible and less error-prone than using
a mere strtoul(3).
2003-08-05 15:04:39 +00:00
yar
fd12f37f53 Exit with a non-zero status upon a block allocation failure.
The old way of just returning could result in a file system
extremely likely to panic the kernel.  The warning printed
wouldn't help much since tools invoking newfs(8), e.g., mdmfs(8),
couldn't detect the error.

PR:		bin/55078
MFC after:	1 week
2003-08-05 13:35:17 +00:00
johan
7595263f3a Make this WARNS=6 clean by:
1: add 'const' to char * where needed;
 2: mark unused variables with __unused;
 3: remove double prototypes for mode_edit and mode_list.
 4: moves the global variables 'bus', 'target', and 'lun' into
        the main function and protect them with #ifndef MINIMALISTIC,
 5: renames 3 variable in order not to shadow other things
        index -> indx -- in modepage_dump since index is a function
		from <strings.h.>
        arglist -> arglst -- in the function parse_btl since arglist
                is also a global variable
        convertend -> convertend2 -- in the function editentry_set
                since that name is used two times within the function.
 6: cast 0xffffffff in the macro RESOLUTION_MAX(size) to (int)
        since it is unsigned otherwise.

Tested by:	make universe
Approved by:	ken
2003-08-05 09:19:07 +00:00
ache
1bc08db7d6 LANG->LC_ALL
Pointed by:     ru
2003-08-04 21:31:53 +00:00
ache
3501463149 Fix problem differently, use 
LANG=C tr 'a-z' 'A-Z'                                                         
for hypotetical case that script may generate non-ascii characters
2003-08-04 15:25:39 +00:00
ache
a89b319afc Use tr '[:lower:]' '[:upper:]' to work with any locale 2003-08-04 14:32:56 +00:00
obrien
fec0a6a2ee style.Makefile(5)'ize 2003-08-03 15:17:28 +00:00
ru
b1bfc68fda Spell "file system" correctly. 2003-08-01 11:31:19 +00:00
harti
345797b768 Make firmware version 4.1.12 the default for download to PCA-200E adapters.
The old firmware (3.0.1) can still be used by specifying the '-3' option
to fore_dnld.

Document the -r option that resets the adapter prior to the download.

Ther newer firmware version allows traffic shaping.
2003-07-31 14:26:07 +00:00
harti
9148b94141 Fix the code with respect to the assumption that sizeof(long) == 4. 2003-07-30 16:15:49 +00:00
harti
24872097b0 Fix what was a common idiom in PDP-11 days: declare a local int and
use the address of that int for read(2). While this happens to work on
LE, it surely is wrong on BE.
2003-07-30 16:02:50 +00:00
harti
17dc454310 Make this compile with WARNS=6. 2003-07-30 15:58:08 +00:00
harti
fbab5c5d7a Fix warnings: a variable that was unused, a variable that
was unused unless sun was defined and printing of u_longs
with %x.

PR:		bin/39818
Submitted by:	dan@obluda.cz
MFC after:	1 week
2003-07-30 14:56:25 +00:00
harti
519da382d2 Use size_t for buffer sizes. Improve error handling in some places.
Remove a __DECONST() that was needed before this interface cleanup.
2003-07-29 13:37:04 +00:00
harti
bf1661867a Add support for CBR and VBR PVCs. Enhance the error handling for
the 'add pvc' command.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
2003-07-28 15:27:12 +00:00
mbr
3ac356e843 Enable dhclient to poll the interface state and send only
requests if the interface has an active link. This is a
great benefit if you often change networks with your laptop
and you do not like to kill/restart dhclient all the time.
Changes are automatically detected and the link is refreshed.

The change allows us to start dhclient in background mode
Enable dhclient to poll the interface state and send only
requests if the interface has an active link. This is a
great benefit if you often change networks with your laptop
and you do not like to kill/restart dhclient all the time.
Changes are automatically detected and the link is refreshed.

The change allows us to start dhclient in background mode
while the network cable is not plugged in.

To control the polling interval, the option -i has been
introduced. It takes seconds as parameter, the minimum is
one second, the default is five seconds.

Polling is done in seconds, not microseconds, because dhclient
does internally work with timeouts in seconds.

This change will be part of the next major ISC-dhcpd release.

Tested by:	bms, imp, and many many others.
Reviewed by:	murray, eivind, dhclient folks
2003-07-28 08:30:11 +00:00
harti
90b9d9dfb4 Make atm WARNS=6 clean. The changes are mostly:
- remove some instances of __P()
 - use real prototypes and un-K&R function headers
 - constify where necessary (mostly strings and structures containing
   strings)
 - make functions and variables static that need not to be global
 - tag unused function parameters as __unused

Testing:	a fresh universe
2003-07-28 08:14:27 +00:00
maxim
eed6e1bc5d o Fix usage(): remove '-l', add missed '-f', sort. 2003-07-26 15:29:10 +00:00
simon
3e9f766b84 Remove references to the '-l' option in synopsis. The rest of the
description of this option was removed in v. 1.22.

PR:		docs/54880
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
Approved by:	ceri (mentor)
2003-07-26 12:57:56 +00:00
simon
6463d92301 Minor mdoc(7) cleanup, based on the PR below.
PR:		docs/54826
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
Reviewed by:	ru
Approved by:	ceri (mentor)
2003-07-26 12:41:44 +00:00
harti
512df2a789 When deciding whether to download the microcode or not look at the API rather
than at the vendor. We have three different Fore cards and only the PCA200
need the microcode. Look also at the RAM address and load the code only if
it is not zero. A zero RAM address means either a bug in the driver or
this is a interface created by harp(4) in which case fatm(4) handles the
microcode issue.
2003-07-25 12:40:03 +00:00
harti
5d4231fe03 Due to a gcc bug, it doesn't like local variables with names like 'sin'.
Rename this for the moment. Also fix a sparc64 alignment warning.
2003-07-25 08:15:09 +00:00
harti
87a7a187f8 Make ilmid WARNS=6 clean. The problem were a couple of unused function
arguments and missing consts.
2003-07-25 08:09:18 +00:00
peter
ce508b87aa Build /sbin/gpt on amd64 for good luck as well. 2003-07-24 01:42:49 +00:00
imp
2a341818c0 Simplistic C comment re is wrong, use more correct one 2003-07-23 23:50:25 +00:00
imp
be3888273b Remove old workaround 2003-07-23 23:50:00 +00:00
luigi
656511bf7a Add a note that net.inet.ip.fw.autoinc_step is ipfw2-specific 2003-07-22 07:41:24 +00:00
maxim
b327b2db59 Quote from a Problem Report:
The output format specifier for the round-trip time in ping6 should be
changed to %.3f instead of %g since %g doesn't accurately represent the
precision of the number being output. In particular, %g truncates trailing
zeroes. 0.01 ms does not mean the same thing as 0.010 ms. Although they
are numerically identical, they do not have the same precision.

PR:		bin/52324, bin/52750
Submitted by:	dg
MFC after:	1 week
2003-07-21 11:06:47 +00:00
maxim
a330d8757f o Initialize do_pipe before command parsing.
PR:		bin/54649
Submitted by:	Andy Gilligan <andy@evo6.org>
MFC after:	3 days
2003-07-21 09:56:05 +00:00
iedowse
f59c44cb52 Take advantage of the use of file system IDs to simplify umount(8)
and make it work more reliably in a number of cases that have
traditionally been troublesome. The new behaviour is:
 1) If the filesystem can be determined by the fsid or device,
    or uniquely identified by the mountpoint, then just go ahead
    and call unmount(2) using the file system ID.
 2) Otherwise use fstatfs(2) to resolve the path into a file system
    ID (checking with stat(2) that it is a filesystem root directory).

Case 2 can potentially block if an NFS server is down, but it can
always be avoided by using an unambiguous specification. It handles
all the hard cases such as symlinks and mismatches between the mount
list and reality. For example, if a filesystem was mounted as /mnt
inside a chroot, it will show up in the mount list as /mnt, but now
you can unmount it from outside the chroot with "umount /chroot_path/mnt".
2003-07-20 00:11:27 +00:00
iedowse
c9d13758b8 When mount(8) is invoked with the `-v' flag, display the filesystem
ID for each file system in addition to the normal information.

In umount(8), accept filesystem IDs as well as the usual device and
path names. This makes it possible to unambiguously specify which
file system is to be unmounted even when two or more file systems
share the same device and mountpoint names (e.g. NFS mounts from
the same export into different chroots).

Suggested by:	Dan Nelson <dnelson@allantgroup.com>
2003-07-18 17:43:13 +00:00
harti
14d46d5fe2 Don't call print_pdu() when we are not debugging. This would result
in calling fprintf() with a NULL fp. Strange enough this didn't result
in cores in stable, but results in cores now.

MFC after:	2 weeks
2003-07-18 11:17:04 +00:00
iedowse
273ef56cf1 Since checkmntlist() and getmntentry() return a struct statfs that
includes the filesystem type name, remove the "type" output parameter.
2003-07-18 08:01:10 +00:00
iedowse
23fbeb8a5b When the file system to unmount is specified by device name instead
of by mount point, umount had to take care not to unmount the wrong
file system if another file system was covering the requested one.
Now that the file system to unmount is specified to the kernel using
the filesystem ID, this confusion cannot occur, so remove the code
that checked for it.
2003-07-18 01:10:16 +00:00
luigi
1e31b0c11f Userland side of:
Allow set 31 to be used for rules other than 65535.
Set 31 is still special because rules belonging to it are not deleted
by the "ipfw flush" command, but must be deleted explicitly with
"ipfw delete set 31" or by individual rule numbers.

This implement a flexible form of "persistent rules" which you might
want to have available even after an "ipfw flush".
Note that this change does not violate POLA, because you could not
use set 31 in a ruleset before this change.

Suggested by: Paul Richards
2003-07-15 23:08:44 +00:00
luigi
44fcc4f275 Make sure that comments are printed at the end of a rule.
Reported by:  Patrick Tracanelli <eksffa@freebsdbrasil.com.br>
2003-07-15 10:23:43 +00:00
luigi
bff9d0776a Fix one typo in help() string, remove whitespace at end of line and
other minor whitespace changes.

Replace u_char with uint8_t in a few places.
2003-07-14 18:57:41 +00:00
maxim
c10e45385e o Rename local variables, do not shadow global declarations. 2003-07-14 12:43:48 +00:00
maxim
62b15fba5d o Kill MINICMPLEN, there is ICMP_MINLEN already. 2003-07-14 12:42:47 +00:00
maxim
514601f8bb o Be ready to get a reply with length up to IP_MAXPACKET.
o Warn when recieved packet length is not equal to length of the
packet we sent out. Idea from NetBSD.
o Fit the dump of packet with wrong data to 80 columns (from NetBSD).

Comments from:	bde
2003-07-14 12:37:03 +00:00
luigi
2841d8f3d3 ccept of empty lines when reading from a file (this fixes a bug
introduced in the latest commits).

Also:

* update the 'ipfw -h' output;

* allow rules of the form "100 add allow ..." i.e. with the index first.
  (requested by Paul Richards). This was an undocumented ipfw1 behaviour,
  and it is left undocumented.

and minor code cleanups.
2003-07-14 08:39:49 +00:00
grog
ef9b0e6a83 Remove reference to max block size. dump no longer limits the block size. 2003-07-14 02:22:55 +00:00
luigi
62187bd884 Add a '-T' flag to print the timestamp as numeric value instead
of converting it with ctime(). This is a lot more convenient for
postprocessing.

Submitted by: "Jacob S. Barrett" <jbarrett@amduat.net>
2003-07-12 08:35:25 +00:00
luigi
81bfe133e1 Document the existence of comments in ipfw rules,
the new flags handled when reading from a file,
and clarify that only numeric values are allowed for icmptypes.

MFC after: 3 days
2003-07-12 07:01:48 +00:00
luigi
c99f78429c In random order:
* make the code compile with WARNS=5 (at least on i386), mostly
  by adding 'const' specifier and replacing "void *" with "char *"
  in places where pointer arithmetic was used.
  This also spotted a few places where invalid tests (e.g. uint < 0)
  were used.

* support ranges in "list" and "show" commands. Now you can say

        ipfw show 100-1000 4000-8000

  which is very convenient when you have large rulesets.

* implement comments in ipfw commands. These are implemented in the
  kernel as O_NOP commands (which always match) whose body contains
  the comment string. In userland, a comment is a C++-style comment:

        ipfw add allow ip from me to any // i can talk to everybody

  The choice of '//' versus '#' is somewhat arbitrary, but because
  the preprocessor/readfile part of ipfw used to strip away '#',
  I did not want to change this behaviour.

  If a rule only contains a comment

        ipfw add 1000 // this rule is just a comment

  then it is stored as a 'count' rule (this is also to remind
  the user that scanning through a rule is expensive).

* improve handling of flags (still to be completed).
  ipfw_main() was written thinking of 'one rule per ipfw invocation',
  and so flags are set and never cleared. With readfile/preprocessor
  support, this changes and certain flags should be reset on each
  line. For the time being, only fix handling of '-a' which
  differentiates the "list" and "show" commands.

* rework the preprocessor support -- ipfw_main() already had most
  of the parsing code, so i have moved in there the only missing
  bit (stripping away '#' and comments) and removed the parsing
  from ipfw_readfile().
  Also, add some more options (such as -c, -N, -S) to the readfile
  section.

MFC after: 3 days
2003-07-12 06:53:16 +00:00
kan
9e7af78d2e Do not compare unsigned int values with ULONG_MAX. The comparison is
always false on 64bit platforms and GCC 3.3.1 issues warning there.
2003-07-11 05:47:05 +00:00
dannyboy
f2616fb41a Correct to match reality regarding interface names.
PR:		51006
Submitted by:	"Dmitry Pryanishnikov" <dmitry@atlantis.dp.ua>
mdoc clue by:	"Simon L. Nielsen" <simon@nitro.dk>
MFC after:	10 days
2003-07-08 13:24:42 +00:00
luigi
3bf3085bc3 * introduce a section on SYNTAX to document the handling
spaces and comma-separated lists of arguments;

* reword the description of address specifications, to include
  previous and current changes for address sets and lists;

* document the new '-n' flag.

* update the section on differences between ipfw1 and ipfw2
  (this is becoming boring!)

MFC after: 3 days
2003-07-08 08:07:03 +00:00
luigi
0fe7344300 A bunch of changes (mostly syntactic sugar, all backward compatible):
* Make the addr-set size optional (defaults to /24)
    You can now write 1.2.3.0/24{56-80} or  1.2.3.0{56-80}
    Also make the parser more strict.

  * Support a new format for the list of addresses:
        1.2.3.4,5.6.7.8/30,9.10.11.12/22,12.12.12.13, ...
    which exploits the new capabilities of O_IP_SRC_MASK/O_IP_DST_MASK

  * Allow spaces after commas to make lists of addresses more readable.
        1.2.3.4, 5.6.7.8/30, 9.10.11.12/22, 12.12.12.13, ...

  * ipfw will now accept full commands as a single argument and strip
    extra leading/trailing whitespace as below:
        ipfw "-q add allow ip from 1.2.3.4 to 5.6.7.8, 9.10.11.23 "
    This should help in moving the body of ipfw into a library
    that user programs can invoke.

  * Cleanup some comments and data structures.

  * Do not print rule counters for dynamic rules with ipfw -d list
    (PR 51182)

  * Improve 'ipfw -h' output (PR 46785)

  * Add a '-n' flag to test the syntax of commands without actually
    calling [gs]etsockopt() (PR 44238)

  * Support the '-n' flag also with the preprocessors;

Manpage commit to follow.

MFC after: 3 days
2003-07-08 07:52:47 +00:00
imp
738a947fd0 Drop the pid file after we call the final daemon call. w/o -n would
give the wrong pid.

Submitted by: ru and Lukas Ertl
PR: 54113
2003-07-05 00:43:50 +00:00
luigi
a3f2ecde89 Implement the 'ipsec' option to match packets coming out of an ipsec tunnel.
Should work with both regular and fast ipsec (mutually exclusive).
See manpage for more details.

Submitted by: Ari Suutari (ari.suutari@syncrontech.com)
Revised by: sam
MFC after: 1 week
2003-07-04 21:42:32 +00:00
gordon
f526e4aeea Remove smbfs, portalfs, and nwfs from sbin. The sources live in usr.sbin
now.
2003-07-02 16:22:43 +00:00
gordon
2e410239fd Move mount_portalfs, mount_smbfs, and mount_nwfs from sbin to usr.sbin.
They don't have alot of reason to be in sbin and contribute to library
bloat in the dynamic case. If you are using any of these filesystem
type to hold your /usr, please seek professional help.

The actual code was repo-copied by joe.
2003-07-02 16:16:49 +00:00
iedowse
74a3e38111 Add a new mount flag MNT_BYFSID that can be used to unmount a file
system by specifying the file system ID instead of a path. Use this
by default in umount(8). This avoids the need to perform any vnode
operations to look up the mount point, so it makes it possible to
unmount a file system whose root vnode cannot be looked up (e.g.
due to a dead NFS server, or a file system that has become detached
from the hierarchy because an underlying file system was unmounted).
It also provides an unambiguous way to specify which file system is
to be unmunted.

Since the ability to unmount using a path name is retained only for
compatibility, that case now just uses a simple string comparison
of the supplied path against f_mntonname of each mounted file system.

Discussed on:	freebsd-arch
mdoc help from:	ru
2003-07-01 17:40:23 +00:00
gordon
b77de74248 Remove pathnames.h.
Pointed out by:	Mathieu Arnold <mat@mat.cc>
2003-06-29 19:03:52 +00:00
gordon
d336339d95 Tweak a couple of utilities so they compile cleanly for /rescue. Mostly
path fixes.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:46:18 +00:00
gordon
febd8b1f51 Move path definitions to include/paths.h. This makes it easier to override
these definitions in the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:06:05 +00:00
gordon
2da83d3d2b 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
fcf9a54ae5 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
7b526a9a71 remove extra whitespace and blank lines 2003-06-27 17:18:14 +00:00
sam
65fe37367a 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
212e1d39ff 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
357f9a82c3 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
fe1ceb9d12 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
b39ebb2ba1 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
cda2031eb8 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
52ba467ddf 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
4b4bacfb9a 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
0533c7b31b Remove another reference to ffsinfo.8 2003-06-17 22:47:11 +00:00
brueffer
4e677c8ec0 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
26ef54d4b0 Xref police: chmod(8) -> chmod(1). 2003-06-17 09:53:03 +00:00
phk
e88c3b34c6 Compile sunlabel on all archs. 2003-06-17 09:12:42 +00:00
maxim
9da9eb909e 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
ff38e19860 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
18c4fc47dc 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
b5d0ba09ab 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
d6797279c5 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
5a4188695a Remove "label" keyword. 2003-06-12 05:54:53 +00:00
obrien
82803fe530 style clean. 2003-06-11 23:24:31 +00:00
rwatson
2299752110 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
5788466280 Be consistent about module names. 2003-06-09 21:50:41 +00:00
phk
1d1e72c7b8 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
8b207107b5 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
88ef4fc320 .Nm -> .Xr 2003-06-08 12:57:39 +00:00
charnier
8a952cf872 The .Xr utility 2003-06-08 12:55:55 +00:00
charnier
f92a2c6792 mount_msdos -> mount_msdosfs 2003-06-08 12:53:07 +00:00
charnier
457f5c3e23 Add section number to .Xr 2003-06-08 12:51:28 +00:00
charnier
28c1746547 Add section number to .Xr 2003-06-08 12:40:50 +00:00
phk
1442167f90 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
435d2718c0 Sanitize setting of labeloffset and labelsector. 2003-06-07 09:09:39 +00:00
guido
72a5fde774 Move my maintainership of parts of ipfilter back to Darren Reed 2003-06-06 11:30:50 +00:00
phk
6e9f0f8001 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
7104243c07 Unbreak ia64. 'nuff said. 2003-06-04 02:01:05 +00:00
ticso
5ae9a0597d 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
fef3882fca 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
08f2bf8f48 Use GEOM OAM api to retrive list of configured ccd devices.
Link against libgeom.
2003-06-02 20:50:59 +00:00
phk
7c20a90fd0 Fix sectorsize != 512 on i386 and pc98. Add test cases for same. 2003-06-02 14:19:31 +00:00
ru
fa6a93afe9 Assorted mdoc(7) fixes. 2003-06-02 11:19:24 +00:00
maxim
98411fd413 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
11a350a92d 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
f5b81dcf63 Add pc98 arch to test set.
Remove ktrace which leaked out of test-setup.
2003-06-01 09:30:53 +00:00
obrien
38e89b1a77 Protext copyright[]. 2003-05-31 15:42:56 +00:00
ru
bc1f5bcccb mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-24 19:53:08 +00:00
peter
8d59149e60 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
20718124ca 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
4c45dca0e1 mdoc(7) fixes: Fixed the markup in the BUGS section, bumped document date. 2003-05-19 20:03:28 +00:00
ru
5b12222e7a mdoc(7) fixes: Fix the markup in the recently added ENVIRONMENT section. 2003-05-19 19:58:29 +00:00
ru
8c2ea581a2 mdoc(7) fixes: Mark "gated" with the .Nm macro.
Approved by:	re (blanket)
2003-05-19 19:54:00 +00:00
ru
305c55948d Add a newline at end of file.
Approved by:	re (blanket)
2003-05-19 19:52:29 +00:00
ru
a4695cfb97 Fixed troff(1) and mdoc(7) warnings.
Approved by:	re (blanket)
2003-05-18 21:05:22 +00:00
brueffer
dcfb0d9987 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
d4d688f4da mdoc(7) markup overhaul. 2003-05-17 22:53:44 +00:00
ru
fe65b52b47 Fixed the markup in the recently added ENVIRONMENT section. 2003-05-17 22:35:35 +00:00
ru
140859483f mdoc(7) fix: Add the forgotten paragraph command.
Approved by:	re (blanket)
2003-05-17 22:31:48 +00:00
ru
d135695ab6 mdoc(7) fixes: Expand contraction. 2003-05-17 22:21:27 +00:00
peter
c35c1181be Add fdisk for $MACHINE_ARCH == amd64 2003-05-17 20:40:42 +00:00
ru
432cb137f8 Style fixes.
Reviewed by:	phk
Approved by:	re (scottl)
2003-05-17 19:06:45 +00:00
ru
6abd62b418 Moved libgeom.so dependencies to where they belong.
Reviewed by:	phk
Approved by:	re (scottl)
2003-05-17 19:05:17 +00:00
brueffer
d21d26ed0a 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
c85a17e45d 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
5d5fba96f4 mdoc(7) police: fix more breakages from rev. 1.69. 2003-05-14 16:22:16 +00:00
phk
0a57a34ff5 Add pc98 archtecture entry.
Approved by:	re/rwatson
2003-05-13 19:42:52 +00:00
sheldonh
a91f88bafc 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
72817fa555 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
4e5f0e0f43 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
1de1ba5b89 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
f77acb2fb5 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
02ebb92838 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
7f6b1568fe 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
6ab532db7e 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
7e276fd579 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
887ca00756 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
09c1d3fd07 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
08aaead5a5 Add an example of how to create an fstab entry. 2003-05-05 23:41:17 +00:00
obrien
dc8b1199b7 Centralize _PATH_* definitions.
Submitted by:	Tim Kientzle <kientzle@acm.org> (embellished by me)
2003-05-05 22:49:23 +00:00
phk
431aa2ce49 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
3eda16e5e6 Typo in last commit.
Spotted by:	mbr
2003-05-05 16:33:43 +00:00
phk
982e23a487 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
9f473e058c DOnt allow getting caps from other than master and slave device :) 2003-05-05 10:28:37 +00:00
grog
30d32d94ea vinum_start: Call vinum_read with correct number of parameters. 2003-05-05 08:33:36 +00:00
grog
9db0da00ab 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
cf1d9fdf75 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
a66d5b75d2 Add transparent handling of mbroffset for backwards compatibility. 2003-05-04 19:27:22 +00:00
sos
a0a19b0141 Added more descriptive error outputs.
PR:	46096
2003-05-04 09:51:06 +00:00
sos
a8b8128c57 On getting status print the stripesize on RAID0's. 2003-05-04 09:28:43 +00:00
murray
fdd5be72b0 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
a1c4a9755f 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
e87dde260a Fix the misspelling of DPADD, then fix "make checkdpadd". 2003-05-03 19:49:05 +00:00
obrien
43cf45d89f Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
phk
4a502407aa 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
d5a606c6c2 Some minor remodelling with a large axe. 2003-05-03 09:02:27 +00:00
phk
c4b3f709de Use new geom.ctl based OAM instead of ioctls.
Various cleanup.
2003-05-03 08:04:24 +00:00
phk
30c36021f0 bsd_disklabel_le_dec() takes an extra argument now. 2003-05-02 22:46:44 +00:00
phk
160bc27761 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
3682fb602c Default the location to the compiled for architecture if no -m arg specified. 2003-05-02 20:02:11 +00:00
phk
65f73292c2 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
64ef96217f Pull in geom_bsd_enc.c from sys/geom to encode and decode our labels. 2003-05-02 19:54:18 +00:00
phk
4edf7b4137 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
84ea795912 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
80dc620e7d 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
03240be587 Add "addspare" functionality. 2003-05-02 12:42:31 +00:00
obrien
489743d041 bufpos is used in size_t contexts, so make it one. 2003-05-02 07:08:52 +00:00
obrien
9638ff8411 Set WARNS=1. RESOLUTION_MAX macro has major signed/unsigned issues. 2003-05-02 06:56:32 +00:00
obrien
71ffff1b8c Use __FBSDID. 2003-05-02 06:49:10 +00:00
obrien
8bd5fb7350 Use size_t type vars in sizeof contexts. 2003-05-02 06:46:24 +00:00
ru
44accbcacf Removed all vestiges of KerberosIV. 2003-05-01 21:18:36 +00:00
ru
12e7818c41 Style. 2003-05-01 21:10:37 +00:00
ru
e8c4d9b168 Fixed the MLINKS assignment style. 2003-05-01 20:35:30 +00:00
markm
99cd7170d3 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
edc3726397 Oops, DIOCGPC98 should be DIOCSPC98. 2003-05-01 14:30:59 +00:00
nyan
cc6c60e4d4 Merged from src/sbin/fdisk/Makefile revision 1.10. 2003-05-01 13:53:41 +00:00
nyan
02964660e3 Merged from src/sbin/fdisk/fdisk.c revision 1.69. 2003-05-01 13:27:11 +00:00
grog
cd95ae6603 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
5a71bfd07c 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
695d529dda 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
cc1dd37953 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
f98f7be35e 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
271c6ad887 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
d6150c9548 document mode directive 2003-04-28 16:47:40 +00:00
sam
42c2317f33 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
4989b93123 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
3d50a7c7d8 Fix for dynamic linking.
Submitted by:	Alex Deiter <tiamat@komi.mts.ru>
2003-04-27 21:24:05 +00:00
dougb
54acfe8b8b Add .Xr's to mdmfs(8).
Submitted by:	Scot W. Hetzel <hetzels@westbend.net>
2003-04-27 01:46:56 +00:00
dougb
90be04facb Also MLINK the man page for mount_mfs. 2003-04-27 01:40:45 +00:00
dougb
f07134d08f 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
912138f780 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
562f7a033d 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
12d3a8ac15 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
6b965e03c0 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
3cc75f1128 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
7f11f6070d 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
d0aba9f048 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
250ba579cd 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
59a0e54dda 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
6b2af52a38 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
8389eb0162 Add testcases to ensure that overwriting bootcode does not trash label. 2003-04-23 08:25:44 +00:00
phk
305a35650e 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
2f88fe8934 Do not link sunlabel to disklabel. 2003-04-23 06:37:57 +00:00
phk
1497892676 Add "-r" when we initialize the label first time.
Add two more tests.
2003-04-22 21:04:48 +00:00
johan
c1f2f558bf 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
b424c24a4a 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
4131d4b806 Add minimal regression test for hotspot handling of the sunlabel. 2003-04-21 20:16:07 +00:00
imp
8c0fbffe62 Kill debug printf that crept in my last commit 2003-04-21 17:25:39 +00:00
imp
f438262cfc 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
3c266c65a3 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
dc7e0f76ad 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
2f3e8c4760 devd.conf already has the examples in the todo list 2003-04-21 03:29:53 +00:00
brueffer
e6e4784cf0 Remove reference to diskpart(8)
PR:		51193
Submitted by:	Yonatan@xpert.com
2003-04-20 19:16:21 +00:00
rwatson
d5f85fc552 Throw the switch--change to UFS2 as our default file system format for
FreeBSD 5.1-RELEASE and later:

- newfs(8) will now create UFS2 file systems unless UFS1 is specifically
  requested (-O1).  To do this, I just twiddled the Oflag default.

- sysinstall(8) will now select UFS2 as the default layout for new
  file systems unless specifically requested (use '1' and '2' to change
  the file system layout in the disk labeler).  To do this, I inverted
  the ufs2 flag into a ufs1 flag, since ufs2 is now the default and
  ufs1 is the edge case.  There's a slight semantic change in the
  key behavior: '2' no longer toggles, it changes the selection to UFS2.

This is very similar to a patch David O'Brien sent me at one point, and
that I couldn't find.

Approved by:	re (telecon)
Reviewed by:	mckusick, phk, bmah
2003-04-20 14:08:05 +00:00
phk
6361abb555 Add the beginning of a regression test.
So far it checks the overwrites of the BSD label inband (ie: dd
if=/dev/ad0a of=/dev/ad2a).

This excercises the geom::slice::hotspot code.
2003-04-18 22:20:46 +00:00
phk
a34e2cfbbf Solve printf/cast issues to make this compile in i386 as well. 2003-04-18 20:27:16 +00:00
phk
d075376c72 First scrub of s/disklabel/bsdlabel/
bsdlabel.5 deliberately exempted, its contents looks less than useful.
2003-04-18 19:44:12 +00:00
trhodes
33a9ee801c Quick grammar fix. 2003-04-17 17:36:31 +00:00
ru
389955d5eb There is an undocument feature that ``route -vnd flush'' prints
a nice dump of the entire routing table.  Allow non-root users
to see it too.
2003-04-16 12:06:53 +00:00
ru
af59acd949 Normalize, fix ``make checkdpadd''. 2003-04-16 11:54:11 +00:00
sumikawa
8e30ef90ad Use NI_xxx macros.
Obtained from:	KAME
MFC after:	1 week
2003-04-16 09:53:29 +00:00
jake
830f76fef9 Hardlink sunlabel to disklabel so make release is happy. (This only affects
sparc64, where bsd^H^H^Hdisklabel isn't built.)
2003-04-15 23:49:31 +00:00
jake
7b8869ff72 - Use read(2) to get the existing sunlabel on a disk, instead of parsing
kern.geom.conftxt, which md disks don't show up in.  If the magic and
  the checksum are right assume its a valid sunlabel, otherwise use the
  DIOC ioctls to get the disk parameters and whip up a label out of thin
  air.
- Don't just silently create or correct invalid c partitions, warn about
  invalid ones in label proto files.
- Split checksumming into a function since we do it a couple times.  Also
  don't include the sl_cksum field in the checksum, which avoids needing
  to clear it first.

This is makes sunlabel a suitable replacement for disklabel in make release.
2003-04-15 23:46:19 +00:00
mdodd
70cef24caf Don't abuse module names to facilitate ifconfig module loading;
such abuse isn't really needed.  (And if we do need type information
associated with a module then we should make it explicit and not
use hacks.)
2003-04-15 06:25:58 +00:00
phk
a5b21de2f4 Avoid off_t -> integer overflow when sorting the locksector addresses. 2003-04-14 09:36:39 +00:00
maxim
a2fab40f93 o Skip timestamp part when checking payload.
PR:		bin/50909
Submitted by:	Barney Wolff <barney@lab.databus.com>
2003-04-14 08:34:14 +00:00
phk
5b83ce0b3a Use symbolic constants from <sys/diskmbr.h> instead of local constants.
Always set the magic sequence when we write, rather than trusting the
previously read boot code to do so.

Use explicit encoding/decoding of little endian disk image.

Remove a comment which was OBE.

Change the test vector for "fdisk -I" to reflect that there is a magic
sequence in the result now.

Add test case for "fdisk" which reads the image back.

At least for the two test-cases this program now gives the same result
on sparc64 as on i386.  The lack of an installed /boot/mbr on sparc64
raises an (un)interesting question.
2003-04-13 21:57:08 +00:00
phk
160cf41f80 Pull in the encoding/decoding functions for struct dos_partition.
Add a very simple regression test for "fdisk -I".
2003-04-13 21:34:16 +00:00
phk
3bd8a2129b Add a couple of undocumented test options to MD(4) to aid in regression
testting of GEOM.
2003-04-09 11:59:29 +00:00
mdodd
86d38b4e71 Bump the date for recent commits. 2003-04-07 22:58:35 +00:00
mdodd
2f4fdb2156 Clarify the behavior of PATH_FSTAB with regard to 'tainted' execution.
Requested by:	 ru
2003-04-07 14:21:14 +00:00