Commit Graph

3733 Commits

Author SHA1 Message Date
rumble dab9f713b9 Do not exceed 80 columns. No functional change. 2004-09-21 15:47:32 +00:00
yamt 22ce35857e fix blks command.
- use 64-bit variables for lbns.
- correct file block offsets in the case of absent indirect blocks.
2004-09-17 12:18:55 +00:00
erh 4ed261aea9 Add a couple cross-references to make similar ctl commands easier to find. 2004-09-16 18:02:27 +00:00
minoura da5384833d Changes from rev 1.34 and 1.35 of sbin/newfs_lfs/lfs.c. 2004-09-15 03:24:09 +00:00
dsl 9721e88965 Fix intuit_translated_geometry() calculation.
From Izumi Tsutsui in PR bin/26917
2004-09-12 07:46:24 +00:00
yamt 48f5be416a - calculate maxfilesize dynamically rather than having a static table.
- no longer limit filesize to INT32_MAX.  file lbns are 64-bit these days.
  anyway, on-disk format shouldn't be limited by the kernel internals.
2004-09-11 08:33:53 +00:00
atatat d96c6bad93 Add some more attribute "names", taken from
http://freepgs.com/smart/attributes.php

which gets them from smartmontools as maintained by Bruce Allen.

Note that some of these attributes should be "named" differently
depending on the drive (point for future work?), but at least now
there are names for some of the one that were missing them.
2004-09-10 04:11:09 +00:00
atatat 2a3ef0e821 White space police 2004-09-10 03:43:52 +00:00
yamt 6928fd95a8 fix a sign expansion bug for >=8k blocksizes. 2004-09-09 22:57:19 +00:00
jrf 190b2e4c51 Replaced strncpy with strlcpy. Thanks to Peter Postma who
pointed them our in PR #25762. Approved by christos@NetBSD.org.
2004-09-07 13:20:39 +00:00
lukem 1e6cfcfcaf fix typo 2004-09-07 02:18:06 +00:00
jdolecek 56afb5b885 fix typo 2004-09-01 19:38:09 +00:00
chs a3b206f61a pass data to a function via an argument instead of via a global variable.
this avoids a name collision with libcurses functions when both are
present in a crunched static binary.  part of PR 26458.
2004-09-01 01:47:09 +00:00
uwe 06227c9f8b Drop bogus .Bl/.El uncovered by new mdoc. 2004-08-31 17:08:06 +00:00
wiz ef90a2a4b4 Bump date for improved bad sector
description.
2004-08-30 12:53:30 +00:00
drochner afa0d914f3 mention that the "badsector" subcommend depends on the WD_BADSECTOR
kernel option
2004-08-30 09:38:28 +00:00
wiz 484705032c Bump date for removal of net.key.random_int. 2004-08-27 14:35:11 +00:00
itojun 8ba8c58e74 remove net.key.random_int 2004-08-27 04:58:10 +00:00
christos 4ee0bfb762 Remove special case for RESCUEDIR 2004-08-19 23:02:51 +00:00
christos c7e7e2b5bf Remove special case 2004-08-19 23:02:27 +00:00
christos 79455d444d Handle RESCUEDIR 2004-08-19 23:00:22 +00:00
christos ea369b9669 Deal with RESCUEDIR 2004-08-19 22:25:49 +00:00
christos 684fe4faed Remove RESCUEDIR hack; it will be done centrally. 2004-08-19 22:21:51 +00:00
drochner bdf36e0430 +drvctl 2004-08-19 10:20:59 +00:00
wiz 702f9dca18 Sync usage with man page. 2004-08-18 13:24:55 +00:00
wiz 79632fc9ad New sentence, new line. 2004-08-18 13:21:36 +00:00
drochner 0c34f6cd99 add a little utility to exercise the rescan / detach autoconf functions 2004-08-18 12:30:01 +00:00
mycroft e0fc84bd24 Put back one of the sleep()s -- it doesn't affect us in the usual case. 2004-08-13 17:22:39 +00:00
mycroft f3b5a6849c Replace the sleep(2) in setctty() with a nanosleep(), with a default value of
250ms.
2004-08-13 17:19:15 +00:00
mycroft 40321c3f44 Remove a completely gratuitous 30 delay if you enter the wrong shell path. 2004-08-13 17:11:49 +00:00
wiz a5c8081d79 Bump date for previous, and re-add some flags that were removed in the
previous commit without a mention in the commit message, and which are
still in the usage.
2004-08-13 15:24:03 +00:00
tv 21840e450a Add "urandomkey" key generation method as described in PR kern/22766;
useful for configuring a throwaway key for cgd-on-swap at boot time.
2004-08-13 15:03:57 +00:00
rumble 6b72b5c789 In getkey(), check the return values of the various keygen functions
and abort if necessary. Also, check for errors in its callers and
handle them gracefully.

OK'd by elric.
2004-08-10 02:29:34 +00:00
rumble 3db339be14 Avoid dereferencing/free()ing invalid pointers if the random device
cannot be opened.

OK'd by elric.
2004-08-10 02:27:26 +00:00
lukem c9e78fddc5 Signal handlers should manipulate 'volatile sig_atomic_t' instead of 'int'. 2004-08-08 09:46:16 +00:00
christos fe9cbbdccb cleanup some lint
remove unused variables
XXX: fs.h macros are not portable in ansi.
2004-08-08 02:51:19 +00:00
christos ad04e20d5f warns = 3 2004-08-08 02:50:46 +00:00
christos 7abcefad61 - fix broken superblock finding code was wrong.
- ansify, KNF
- if the filesystem was not modified, don't ask the user to fsck.
2004-08-08 00:55:06 +00:00
wiz 2e3cdda09c No leading zeroes in date string. 2004-08-02 23:16:02 +00:00
bouyer 502e9c8209 Add infrastructure for ATA bus commands, and implement the reset bus command. 2004-08-01 21:41:49 +00:00
dbj 3aca86e05b check sysctl error return on both calls.
this prevents sysctl from coredumping if the second call fails while the
first succeeds.  This isn't supposed to happen, but there is another bug
in the i386 kernel implementation of sysctl machdep.diskinfo that excites this
2004-07-30 23:42:29 +00:00
jmmv ea287a80b7 Add 2004 to copyright notice as these has been significantly modified recently. 2004-07-30 15:22:42 +00:00
jmmv 1e4eaac87a Add an example on how to change the kernel message colors. This is
illustrative because it shows the use of the '-d' flag and how one can
set multiple variables in the same run of wsconsctl(8).
2004-07-30 11:21:16 +00:00
jmmv fcc698e864 Do not show several variables when they are not available.
At the moment this only affects the display part, hiding console colors,
border color and/or console scrollback if their respective ioctls are
not supported by the running kernel.

Trying to write to these variables will still fail with the correct ioctl
error message.
2004-07-30 11:08:03 +00:00
jmmv 2a08d54a9a Implement border color customization in wscons(4), only available for vga(4)
at the moment.

This includes the addition of two new wsdisplay ioctls, WSDISPLAY_{G,S}BORDER,
one to get the actual color and one to set it, respectively.  Possible colors
match those defined by ANSI (and listed in wsdisplayvar.h).

It also adds two accessops to the underlying graphics device, getborder and
setborder, which mach their ioctl counterparts.

Two kernel options are added: WSDISPLAY_CUSTOM_BORDER, which enables the
ioctls described above (to customize the border color from userland after
boot), and WSDISPLAY_BORDER_COLOR, which sets the color at boot time.
The former is enabled by default on the GENERIC kernel, but not on INSTALL
(among others).  The later is always commented out, leaving the usual black
border as a default.

wsconsctl is modified to allow accessing this value easily.  For example,
'wsconsctl -d -w border=blue'.
2004-07-29 22:29:35 +00:00
jmmv 92f81ea7d3 Implement support to dynamically change wscons console and kernel colors.
Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it.  This is optional, which means that this also works with other drivers
that don't have this new operation.

Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
  change the colors dynamically from userland.  This is enabled by default
  in the GENERIC kernel (as well as others) but disabled on all INSTALL*
  kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
  which specify the default colors for the console at boot time.  These have
  the same meaning as the (already existing) WS_KERNEL_* variables.

wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.
2004-07-28 12:34:02 +00:00
yamt 230c4c9c74 err -> errx where appropriate. 2004-07-27 14:25:19 +00:00
wiz 816f9f8757 Add -D to usage; shorten -b argument for usage's sake; format usage.
Man page nits.
2004-07-27 14:20:11 +00:00
enami 047e7ad434 Whitespace nits. 2004-07-27 02:20:56 +00:00
enami 5d75faa43f Add -D flag which computes the digest of each regular files in the archive
using specified algorithm (currently md5, rmd160 or sha1) and write them
to standard output.
2004-07-27 02:17:06 +00:00
yamt 5272b4dd6e ignore promiscuous messages by checking sadb_msg_pid.
ok'ed by itojun.
2004-07-23 12:47:55 +00:00
mycroft 20f54b189f Reduce memory usage slightly. 2004-07-20 15:05:32 +00:00
yamt 17d264b6df zero-out dinode is not a proper way to 'clear' an lfs inode. 2004-07-18 20:51:30 +00:00
yamt 078a5e0d1f remove a prototype of a non-exist function. 2004-07-18 20:03:12 +00:00
tls e8092c77bc Fix an integer overflow that prevented saving cores from machines with
more than 2GB of RAM.

"dumpsize" in the on-disk core header is in pages, but, unfortunately,
c.size in our kcore format is an unsigned 32-bit int, gross.

We sleaze it, using a 64-bit int internally here and handing it to
libkvm as a *signed* 32-bit int.  Won't always work, but shouldn't be
broken any worse than it is now, and sometimes work better.

We must fix the kcore format and libkvm.
2004-07-14 07:26:12 +00:00
enami fdca3f0cf1 Warn overlapping partitions (except the one marked as FS_UNUSED).
Address PR#10777.
2004-07-13 21:23:13 +00:00
uwe 3eac78fb64 s/Nm/Nx/, as it's NetBSD that has ports, not fdisk. 2004-07-13 19:24:03 +00:00
wiz 05be367d55 Add description for -l, from dump(8).
Addresses PR 26066 by Kouichirou Hiratsuka.
2004-07-13 17:08:50 +00:00
wiz af679c56e7 Bump date for previous; new sentence, new line;
sort list of ports where fdisk is available.
2004-07-13 13:38:39 +00:00
darcy e3937fb4c5 Add note top man page explaining that fdisk is not used on all platforms
and list the ones that is is.

Partial fix to PR#25943
2004-07-13 10:45:49 +00:00
mycroft fc82ea195f PR 9431: if rnh_addradd() fails, total_routes will be wrong. 2004-07-06 23:36:24 +00:00
mycroft 1e7044a4ca The change in revision 1.38 (in 1997!) was wrong. If we don't want the kernel
to automatically bring up interfaces, then we should move that code into
ifconfig(8) and out of the kernel, not cycle the interface up and down.  Fixes
PR 9400 -- ifconfig(8) was not working as documented.
2004-07-06 23:26:31 +00:00
wiz e770b57941 Improve description of -b and -m. 2004-07-06 16:51:18 +00:00
wiz 05d7d5d421 Document -m. It was already there, only commented out.
Bump date.

Addresses PR 26067 by Kouichirou Hiratsuka.
2004-07-06 16:49:10 +00:00
wiz de7136f83b usage: -F was missing the /mask part. Based on PR 26063
by Kouichirou Hiratsuka.
2004-07-06 16:43:18 +00:00
wiz f534f0c332 Add -b and -N to usage. Use getprogname.
From Kouichirou Hiratsuka in PR 26064.
2004-07-06 16:39:37 +00:00
elric 04b4d00046 Add options to SYNOPSIS.
Addresses PR misc/26065.
2004-07-04 17:19:57 +00:00
christos d12d56b3d9 PR/26101: Dheeraj: WSKBDIO_GETSCROLL: Operation not supported by device
should not be fatal.
2004-06-28 20:01:33 +00:00
nathanw fa3249e24a Remove an extraneous comment before main() that seems to have been
accidentally cut-and-pasted in with rev 1.30.
2004-06-28 19:27:06 +00:00
jkunz 93856baf4d Add hp700 MD options for proper boot code handling. 2004-06-28 18:21:43 +00:00
itohy 8e9e692241 Fix typos in comment. 2004-06-27 02:09:47 +00:00
wiz 0747ba10a5 Add -a to usage. Closes PR 25916 by Kouichirou Hiratsuka. 2004-06-25 14:50:15 +00:00
wiz 3ca6cf36ec Sync usage with reality. Closes PR 25915 by Kouichirou Hiratsuka. 2004-06-25 14:48:01 +00:00
wiz 32815bb2ee Sort options; bump date. 2004-06-25 14:46:47 +00:00
wiz 95ffcf3187 Minimally document -d; addresses second part of
PR 25914 by Kouichirou Hiratsuka.
2004-06-25 14:44:40 +00:00
wiz c0575451ea Remove last traces of -c, for which the code was removed
last summer; addresses part of PR 25914 by Kouichirou Hiratsuka.
2004-06-25 14:44:16 +00:00
wiz 50cae2d624 Remove removed options from usage. From Kouichirou Hiratsuka in PR 25874. 2004-06-25 14:35:29 +00:00
wiz b4778d6de7 Sync usage with man page (add -w name+=value).
Closes PR 25876 by Kouichirou Hiratsuka.
2004-06-25 14:33:48 +00:00
enami 4a723d4f79 A variable referenced isn't `write only'.
Wrap long line and fix some indent while here.
2004-06-24 03:13:00 +00:00
abs cb52ff7f22 Fix some interesting disklabel lossage:
If the input to 'disklabel' (non -i) referenced a partition two or more
larger than that permitted by npartitions it would error out with 'bad
partition name' (and the option given to re-edit if -e). If a partition one
larger was used it would be dropped from the disklabel with a warning and the
label written anyway! The (off by one) check for a bad partition name was
against npartitions anyway, rather than MAXPARTITIONS. npartitions was just
read from the disklabel and could have been set to an arbitrary value.

Given 'disklabel -i' sets npartitions automatically, make the normal case
check partition names against MAXPARTITIONS, and if necessary increase
npartitions to the size needed to hold the last partition used.

While here remove two 'write only' uses of a 'part' variable.
2004-06-22 18:32:45 +00:00
itojun ad399b67b8 PF from openbsd 3.5
massage pfctl to compile/run on netbsd.  put reachover makefile for pfctl
into src/sbin.
reviewed by matt, perry, christos
2004-06-22 15:16:29 +00:00
jmc b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
christos 4ac79ef5f7 We only need sys/sysctl.h when we are building on NetBSD not as a host tool. 2004-06-17 23:15:07 +00:00
dsl 0ec7914f6a Document 'mknod -l' (list drivers in kernel), and use of driver name
instead of major number.
(all done using sysctl kern.drivers)
2004-06-17 21:30:14 +00:00
dsl 62be2f7f79 Add support for specifying drivers by name and listing the drivers in the
current kernel.
Man page update in progress.
2004-06-17 21:09:01 +00:00
mycroft b98bb8c608 Use pread()/pwrite(). 2004-06-12 01:35:46 +00:00
uebayasi 7714269d97 Fix SEE ALSO; remove .sp; put .Pp before sentences. 2004-06-10 14:13:36 +00:00
itojun fd9a3b1704 correct mistake in usage(). Chris Pinnock 2004-06-09 01:59:20 +00:00
cjep 9c1d6b6c10 Put -T in usage output. PR#25875 from Kouichirou Hiratsuka. 2004-06-08 19:25:16 +00:00
wiz 16ae99405d Drop trailing whitespace. 2004-06-08 15:53:05 +00:00
cjep 946cf9f356 Add options for swapon in the Synopsis section. Closes PR#25866 from
Kouichirou Hiratsuka.
2004-06-08 08:16:11 +00:00
cjep 7ef0be1b58 Fix usage string (i.e. add information about -z). Fixes PR#25865 from
Kouichirou Hiratsuka.
2004-06-08 08:13:16 +00:00
cjep 721eb939af add -h option in synopsis. Fixes PR#25863 from Kouichirou Hiratsuka. 2004-06-08 08:05:30 +00:00
christos e53725b6b7 clear_session_logs is not needed when we are small. 2004-06-06 01:42:20 +00:00
christos 67ec024858 If scrolling support is not compiled in the kernel, fail gracefully. 2004-06-03 19:18:41 +00:00
fair 0b112129b9 Correct a misnumbering of options, as noted in PR 25784. 2004-06-02 19:27:24 +00:00
fair 76b92d1ae9 Increase the SCSI command timeout for device start & stop from 10
to 30 seconds, per PR 25734. I've seen this problem myself. I think
that scsictl should:

1. accept a timeout flag/parameter to set the timeout to an arbitrary
value other than the default.

2. support a verbose mode that would report the timeout value before
the command is started, and then report how long the command actually
took to complete, though I suppose the latter could also be done
by using time(1).
2004-06-01 02:40:00 +00:00
christos 798847428e PR/19925: David Ferlier: add scrolling support to wscons 2004-05-28 21:44:15 +00:00
snj 0e4b8938d9 Bump date for last. Put the exit EXIT STATUS section in the right place.
New sentence, new line.  Correct two typos.
2004-05-28 20:46:52 +00:00
erh 932a41d42e Make it possible to distinguish between exit values that indicate errors,
and those that are warnings.  Document the exit statuses in the man page.
2004-05-28 17:46:49 +00:00