Commit Graph

4325 Commits

Author SHA1 Message Date
ru
0f76b3df6e Removed redundant and unsafe BINDIR redefinition. 2004-07-07 17:33:20 +00:00
pjd
4e6ebbf0ee Fix copy&paste bug. 2004-07-06 18:18:20 +00:00
stefanf
d087b40b84 Parenthesised string literals are invalid in initialisers for character arrays.
Use braces instead.
2004-07-06 17:48:34 +00:00
pjd
f8b8b32b92 - Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous.
- Update manual pages and extend examples.
- Bump versions.
2004-07-05 21:16:37 +00:00
pjd
2640f71eaf MFp4: gmirror(8) is coming soon, and we need g_metadata_read() there. 2004-07-05 02:06:44 +00:00
phk
b2369d6e67 Give natd multi-instance capabilities.
This makes it possible to do load-sharing on two xDSL lines etc.
2004-07-04 12:53:54 +00:00
ru
7f3b38237e One more hard sentence break. 2004-07-03 23:01:44 +00:00
pjd
6157b3cebf Grammar nits.
Submitted by:	David Magda <dmagda@ee.ryerson.ca>
2004-07-03 08:36:09 +00:00
ru
13a170fa1a Deal with double whitespace. 2004-07-03 00:13:43 +00:00
ru
a80e8fe473 Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
pjd
3ad94a6543 Introduce GEOM_LABEL class.
This class is used for detecting volume labels on file systems:
UFS, MSDOSFS (FAT12, FAT16, FAT32) and ISO9660.
It also provide native labelization (there is no need for file system).

g_label_ufs.c is based on geom_vol_ffs from Gordon Tetlow.
g_label_msdos.c and g_label_iso9660.c are probably hacks, I just found
where volume labels are stored and I use those offsets here,
but with this class it should be easy to do it as it should be done by
someone who know how.
Implementing volume labels detection for other file systems also should
be trivial.

New providers are created in those directories:
/dev/ufs/ (UFS1, UFS2)
/dev/msdosfs/ (FAT12, FAT16, FAT32)
/dev/iso9660/ (ISO9660)
/dev/label/ (native labels, configured with glabel(8))

Manual page cleanups and some comments inside were submitted by
Simon L. Nielsen, who was, as always, very helpful. Thanks!
2004-07-02 19:40:36 +00:00
arun
64477062e6 Bump up the date and add spaces around commas. Thanks to ru@ for noticing. 2004-07-02 18:39:15 +00:00
ru
43c762c43d Deal with harmful leading whitespace. 2004-07-02 18:37:52 +00:00
arun
03dd0be5bb Added the ability to create and display Linux/Windows GPT partitions to gpt(8). 2004-07-01 22:27:12 +00:00
imp
8f52d3a780 Create a unix domain socket and write to it all the events that come
in over the socket.
2004-07-01 07:24:18 +00:00
sobomax
5bd353630a o Fix semantics of comparison function for qsort(3). According to qsort(3)
manpage:

     The comparison function must return an integer less than, equal to, or
     greater than zero if the first argument is considered to be respectively
     less than, equal to, or greater than the second.

  Therefore, simply returning "arg1 > arg2" is incorrect. Actually it works
  but for the number of items to be sorted less than 7 due to special case
  handling in qsort(3);

o add missing '\n' to one of usage() calls.

Approved by:	phk
2004-06-25 13:04:49 +00:00
eik
04d8f1a633 fix handling of an unknown progeam name
Noticed by:	Joshua Goodall <joshua@roughtrade.net>
Approved by:	ru
2004-06-22 09:18:50 +00:00
pjd
58c0b4ec90 Print mediasize in human readable form as well. 2004-06-21 09:20:06 +00:00
iedowse
a80c51d742 Print the `99.99% done, finished soon' message only as often as the
normal status messages. Previously a large number of these new
messages could be spewed out towards the end of a dump.

Reviewed by:	imp
2004-06-19 22:41:18 +00:00
green
72a547fc8a Note that conscontrol set and unset are an interface for TIOCCONS. 2004-06-18 20:06:04 +00:00
joerg
f659467d66 Fix indentation of continuation lines to (hopefully) comply with
style(9).

Reminded by:	bde
2004-06-18 15:08:08 +00:00
green
646dcbf721 Add to conscontrol(8) "set" and "unset" commands which modify the
virtual console set-up.  Specifically, "conscontrol unset" will cause
printf(9) output to start going to the console again.
2004-06-18 06:33:44 +00:00
pjd
90db7eed2a Add missing newlines. 2004-06-17 06:04:14 +00:00
mlaier
ce7530e4d3 Commit userland part of pf version 3.5 from OpenBSD (OPENBSD_3_5_BASE). 2004-06-16 23:39:33 +00:00
pjd
838c10c155 Implement 3 new functions:
- g_lcm() - calculates Least Common Multiple of two given values,
		it is helpful when we need to find sector size for provider
		which is based on disks with different sector size;
	- g_get_mediasize() - returns media size of given provider;
	- g_get_sectorsize() - returns sector size of given provider;
Those function aren't used now, but are used by geom_mirror which will be
committed soon.
2004-06-16 10:44:26 +00:00
bms
b8c17bebc9 When parsing an argument as an address in getaddr(), heed the -host option
in all cases.  The failure mode in the PR is easily reproducible without
this patch.

PR:		bin/43139
2004-06-16 06:29:41 +00:00
bms
0e384035b6 Turn on RFC 1724 compliant behaviour with regards to IP_ADD_MEMBERSHIP;
routed should be able to specify multicast memberships to be added by
interface index. This should fix the unnumbered / point-to-point case
for RIPv2.

PR:		bin/51927
Requested by:	Eugene Grosbein
2004-06-16 05:08:57 +00:00
pjd
9e7ef983d9 Connect geom(8) to the build.
Reminded by:	des
2004-06-15 17:31:35 +00:00
bms
3e55a2db42 Ignore kernel routes with the RTF_WASCLONED flag set. This is a slight
modification of a patch which was already applied for BSD/OS in the
Rhyolite.com sources; this file is already off the vendor branch.

PR:		bin/57484
Submitted by:	Richard Perini
2004-06-15 00:23:26 +00:00
bms
7430dae5d8 mdoc(7) police
Submitted by:	ru
2004-06-14 19:31:10 +00:00
bms
354efd98b3 Wordsmith the BUGS section re: IPv6 link-local addresses.
PR:		docs/66541
Submitted by:	Michel Lavondes (with some cleanups/additions)
2004-06-14 16:04:59 +00:00
phk
5aa9cc6c4a Make fdisk initialize the first instead of the last slice by default. 2004-06-14 07:21:19 +00:00
le
b1d9959973 Add gvinum, the geom_vinum userland tool. 2004-06-12 21:22:47 +00:00
eik
e8c6f871b4 Add sha1 and rmd160 checksum tools.
Since the algorithms are already supported in libmd,
the size increase is small when a dynamic root is used.

Approved by:	joerg, ru
MFC after:	2 weeks
2004-06-11 16:07:02 +00:00
joerg
0b8200060f Cast the arguments to make_h_number() to uintmax_t before multiplying
them...  Otherwise the result will be truncated anyway.
2004-06-11 11:41:33 +00:00
ru
9e934dc715 Fixed a bug spotted by compiling with -Wall. 2004-06-10 07:51:11 +00:00
ru
6c0402254a Introduce a new feature to IPFW2: lookup tables. These are useful
for handling large sparse address sets.  Initial implementation by
Vsevolod Lobko <seva@ip.net.ua>, refined by me.

MFC after:	1 week
2004-06-09 20:10:38 +00:00
ru
5c36e4ee65 Reapply traditionally lost fixes, fixed some more.
This manpage needs an English clenup.
2004-06-05 20:22:15 +00:00
stefanf
a867585b89 Typedefing an array of incomplete structs is non-standard C code.
Approved by:	das (mentor)
2004-06-02 23:02:31 +00:00
pjd
0446de4199 Remove extra semicolon.
Inspired by:	fjoe
2004-06-02 21:21:10 +00:00
csjp
93e221909e o Move NEED1 macro to the top of the source file.
o Add sanity checking to the firewall delete operation
  which tells the user that a firewall rule
  specification is required.

The previous behaviour was to exit without reporting any
errors to the user.

Approved by:	bmilekic (mentor)
2004-06-02 21:12:55 +00:00
joerg
88ab7cdf3c ru's mdoc(7) style police was here.
Submitted by:	ru
2004-06-02 20:21:28 +00:00
joerg
83af382bb5 Major overhaul of sunlabel(8).
. Implement option -c, all partition sizes will be calculated
  in cylinders as opposed to sectors.  Since the Sun label is
  inherently cylinder-based, this makes the job a little easier.

. Implement option -h, print the label in `human readable'
  size/offset format.

. Implement SVR4-compatible VTOC-style elements.  They are
  fully optional, defaulting to the current behaviour where no
  VTOC-style table will be written to disk.  However, if
  desired, the full functionality of the partitioning menu of
  Solaris' format(1m) is now offered (and even more).

. When editing the label, do not loop around edit_label() where
  a new template file is generated for each turn, this used to
  be annoying in that any possible syntax error caused a
  complaint, but then the template was created anew, so the
  user had to perform all their editing again.  Rather loop
  inside edit_label(), similar to bsdlabel(8), so in case of
  errors, the user will be presented their previous template
  file again.

. If VTOC-style elements are present, the overlap checks are
  made less stringent.  Overlaps will still be warned about,
  but overlaps of `unmountable' partitions against other ones
  are no longer fatal.  That way, e. g. VxVM encapsulated
  disk labels can be fully edited in FreeBSD (but not in
  Solaris ;-).

. In print_label(), generate the editing hints only if the -e
  flag is in effect.  Additionally, print a hint about the
  total number of sectors in the (hardware) medium.

. When editing a label, allow for changing the geometry
  emulation (and textual name) by modifying the "text:" line
  on top.  That way, a more effective emulation can be
  chosen.

. When editing/reading a label, additionally allow for the
  suffixes `s' (512-byte sectors), and `c' (cylinders) in the
  partition size field.

. Finally, turn the stub man page into something that really
  explains the entire thing.
2004-06-01 20:32:36 +00:00
le
b4ca7c6f48 Fix typo. 2004-05-30 17:40:39 +00:00
dwmalone
d07c213a91 Use a better way to calculate POINTER_WIDTH suggested by pjd@. 2004-05-30 10:10:41 +00:00
dwmalone
f6345243c1 Decide how much space we need to print a pointer using
sizeof(void *) rather than if __alpha__ is defined.
2004-05-28 21:16:44 +00:00
pjd
83a35c9d87 Fix order. 2004-05-26 17:51:53 +00:00
pjd
14302debda Print provider's size in human-readable form as well. 2004-05-26 11:08:35 +00:00
le
b1503ed704 'ld' lists drives, not volumes. 2004-05-25 20:08:50 +00:00
pjd
c406b44290 - Add a cross-reference to geom(8).
- Add missing 'a'.
2004-05-24 23:05:21 +00:00
pjd
3615316e07 Add manual page for geom(8) utility.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-24 23:03:29 +00:00
stefanf
95261f33e2 Use the correct types for the functions rst_opendir(), glob_readdir() and
rst_closedir() which are called by glob().

Reviewed by:	md5
Approved by:	das (mentor)
2004-05-24 16:24:26 +00:00
stefanf
eeb36c045d Include <timeconv.h> for time conversion functions.
Approved by:	das (mentor)
2004-05-24 16:10:57 +00:00
stefanf
1c90903c77 Include <sys/linker.h> for kldload().
Approved by:	das (mentor)
2004-05-24 13:39:06 +00:00
maxim
e2eca170be o Fix usage example.
PR:		docs/67065
Submitted by:	David Syphers
2004-05-23 19:05:59 +00:00
brueffer
c0688c462b Fix typo
Submitted by:	edwin
2004-05-23 08:40:52 +00:00
pjd
00c4dc4a7c Add standard command "help" to print usage. 2004-05-22 16:57:39 +00:00
pjd
70ef853c8d Actually we are also able to list only choosen providers. 2004-05-22 16:17:57 +00:00
pjd
c485ead82c Be more precise. 2004-05-22 10:53:06 +00:00
pjd
3c3779d64a style.Makefile(5). 2004-05-22 10:33:18 +00:00
pjd
5abf73c4a5 Remove gconcat(8) utility. It was replaced by geom(8). 2004-05-21 22:38:49 +00:00
pjd
ae01258177 - More clear example description.
- Fix copy&paste bug.
2004-05-21 22:35:18 +00:00
pjd
f2a4383d9b Add manual pages for gconcat(8), gstripe(8) and gnop(8) utilities.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-21 22:12:24 +00:00
imp
d6552cee0b Enter the 1990's and assume that the computer knows what time it is.
Print the ETA of dump being finished, rather than a cryptic delta
time.  Also, if we have written more blocks than the tapesize, assume
that we are 99.99% done and that we'll be finished 'soon'.
2004-05-21 20:13:33 +00:00
pjd
6d134b764f - Change command name from 'config' to 'configure'.
- Bump version number.
2004-05-21 15:23:48 +00:00
pjd
64ac77e665 Various style.Makefile(5) improvements.
Inspired by:	ru
2004-05-20 20:12:17 +00:00
pjd
ab7719e9e4 Various style.Makefile(5) improvements.
Provoked by:	ru
2004-05-20 20:05:05 +00:00
ru
f946b5d34c Clean up language.
Reviewed by:	rik
2004-05-20 16:40:06 +00:00
des
169dc14206 Whitespace cleanup. 2004-05-20 15:01:26 +00:00
pjd
fa0147a12b Fix supposed compilation problem, using LIBDIR here can confuse core/
compilation.
2004-05-20 14:59:41 +00:00
pjd
68491a792f - Connect geom(8) and its libraries to the build.
- Connect geom_stripe and geom_nop modules to the build.
- Connect STRIPE and NOP classes to the LINT build.
- Disconnect gconcat(8) from the build.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:37:13 +00:00
pjd
4c2ef21e90 Introduce geom(8)-specific shared libraries for CONCAT, STRIPE and NOP
GEOM classes. CONCAT should be 100% compatible with existing gconcat(8)
utility, which is going to be removed.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:24:23 +00:00
pjd
59d57aada2 Bring in geom(8) utility. It is an universal utility for operating on
GEOM classes. It works by loading a shared library via dlopen(3) mechanism
with class-specific code, it is also responsible for communicating with
GEOM via libgeom(3).
Per-class shared libraries are going to be stored in /lib/geom/ directory.
It provides also few standard commands like 'list', 'load' and 'unload'
for existing classes which aren't aware of geom(8).
More info will be send on freebsd-current@ mailing list.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:09:56 +00:00
scottl
61cbba8626 Improve the delay algorithm used in bgfsck. From the author:
shuffles the timing and sleep calls in bgfsck from:

 sleep timer_on io timer_off io io io io io io io
   to
 sleep io io io io io io io timer_on io timer_off

 The original method basically guaranteed that the timed I/O included a
 disk seek every time, which made bgfsck sleep for much longer than
 necessary.

Submitted by:   Dan Nelson
Reviewed by:    kirk
2004-05-18 19:51:41 +00:00
stefanf
6a9e50bc8e Remove spurious semicolons.
Approved by:	das (mentor)
Reviewed by:	ipfw@
2004-05-18 13:57:37 +00:00
ru
598d943869 Markup overhaul. 2004-05-18 07:23:37 +00:00
ru
b9ee00321e Markup nits. 2004-05-17 21:24:06 +00:00
ru
c5d46462ea Correct existing usage lines, add two more. 2004-05-17 21:11:35 +00:00
ru
9f8bc49c9c Markup nits. 2004-05-17 21:05:39 +00:00
ru
1c41049687 Markup and grammar nits. 2004-05-17 20:58:42 +00:00
ru
35530766a1 Markup overhaul. 2004-05-17 20:45:21 +00:00
ru
cde9589110 Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
ru
26e1098cac Reapply local changes that got simply axed by the latest KAME merge.
Fixed some more markup.
2004-05-17 08:25:15 +00:00
ru
9958b0a7f1 Added -l to usage(). 2004-05-17 07:07:20 +00:00
cognet
548b0bdf38 Use WARNS?=3 for these in the arm case for now, due to toolchain issues. 2004-05-14 13:31:21 +00:00
ume
5ebe90b6c8 check if the null encryption is supported or not.
Requested by:	bms
Obtained from:	KAME
2004-05-13 15:46:28 +00:00
ru
e481b619ea Polish the mdoc(7) markup. 2004-05-12 07:34:05 +00:00
hmp
41dbd3c06e Use strlcpy(3) instead of strcpy(3).
PR:          	46761

Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2004-05-10 22:33:12 +00:00
csjp
fc5ed6552d Remove redundant sanity check before add_mac() when adding
mac ipfw rules. The exact same sanity check is performed as
the first operation of add_mac(), so there is no sense
in doing it twice.

Approved by:	bmilekic (mentor)
PR:		bin/55981
2004-05-09 01:53:31 +00:00
csjp
2d0875c869 Teach route(8) how to deal with root being in a prison. If prison
root is allowed to create raw sockets, then they will be able to create
routing sockets, too.  However prison-root is not able to manipulate
routing tables.  So when route(8) attempts to write to a routing
socket and recieves EPERM from the kernel, exit rather than moving
on with execution.

Approved by:    bmilekic (mentor)
2004-05-07 15:33:17 +00:00
joerg
118bb3810a When editing a Sun label, make the search for a valid partition line
violate POLA a little less by not requiring exactly two spaces in front
of the entry (and silently discarding any non-matching entry).  We now
recognize anything starting with a letter followed by a colon as the
first non-space chars as a partition entry.
2004-05-04 09:50:41 +00:00
bde
37d8b83108 Include <sys/time.h> for the declaration of struct bintime instead of
depending on namespace pollution in <sys/stat.h>.  struct bintime is
only needed to satisfy leakage of kernel interfaces to userland and
namespace bugs in those interfaces...
2004-05-04 07:08:04 +00:00
pjd
44f64c901f Add missing command. 2004-05-03 21:31:19 +00:00
pjd
b8be323016 Add missing commands. 2004-05-03 21:29:22 +00:00
pjd
c7115fd564 Connect ggatec(8), ggated(8) and ggatel(8) to the build. 2004-05-03 21:14:03 +00:00
pjd
7ba9850693 Don't repeat handshake.
This little thing can cause a deadlock, because taste mechanism start
to work after creation of ggate provider and I/O requests are sent from
other classes from the g_event thread, so number of pending events isn't 0.
Now ggatec(8) start second handshake and ggated(8) is trying to open
GEOM provider (for example md(4)) and it can't, because it hangs on
g_waitidle() in g_dev_open(). g_waitidle() cannot finish because
there is a pending read on event queue, and this read can't be
finished, because ggated(8) can't open target device.
GEOM Gate will recover from this deadlock, because requests will
timeout, but it of course isn't the best solution and I don't know
better one for now, so we should avoid opening GEOM providers while
there are pending requests in event queue.
2004-05-03 18:24:41 +00:00
andre
b3f3edbde9 Link state change notification of ethernet media to the routing socket.
o Print the link state for interface messages in monitor mode.

No objections by:	sam, wpaul, ru, bms
Brucification by:	bde
2004-05-03 16:30:32 +00:00
pjd
de8f91bb4c Paths correction.
Pointed out by:	ache, make buildworld
2004-05-03 07:21:59 +00:00
pjd
6420bffef3 We don't need this any more, while we have /usr/include/geom/concat/. 2004-05-03 07:20:27 +00:00
pjd
c9733d8224 Fix compiling on 64-bit architectures. 2004-05-02 17:59:49 +00:00