Commit Graph

3626 Commits

Author SHA1 Message Date
itojun 2c96e1a283 use netmask of /32. as discusssed on tech-userlevel 2003-10-02 06:25:28 +00:00
itojun d3e55680aa correct typo. PR misc/22944 2003-10-02 00:09:06 +00:00
itojun 83ddaf1cbf print prefixlen on -show 2003-10-01 06:24:19 +00:00
dsl 4cb1ff990c Forgot the date.... 2003-09-27 19:07:12 +00:00
dsl 0188e8d8ce Add kern.drivers and kern.root_partition to match recent kern_sysctl.c
Add kern.root_device which was absent.
2003-09-27 18:57:05 +00:00
cb 88823a8138 back out revision 1.3. this should not have been committed yet,
since it breaks backward compatibility.

noticed by recht@
2003-09-25 01:43:12 +00:00
wiz 72b77eb9e9 Add article. 2003-09-23 21:25:20 +00:00
cb 7543b55c56 add a new verification method that prompts for the pkcs#5 pbkdf2
passphrase again and checks the generated key against the original.
2003-09-23 17:24:45 +00:00
wiz bc0e64144c Correct error in previous, noted by Nick Hudson. 2003-09-23 12:14:49 +00:00
wiz 0ba80f40e8 Combine multiple single-letter options. 2003-09-21 15:23:55 +00:00
grant 76036fea3c add -e flag to set the separator to '=' where the default is ' = '.
this allows sysctl output to fed back into itself. inspired by
FreeBSD's sysctl(8).

ok'd by atatat.
2003-09-20 17:02:17 +00:00
itojun 731ae88ecd realloc pedant 2003-09-19 08:35:15 +00:00
itojun 6379e11194 realloc pedant 2003-09-19 08:29:58 +00:00
enami 69fc84d695 Need to write entire sector. 2003-09-17 21:09:18 +00:00
grant 9bf724618c put flags in a list with descriptions. add proper description of -w. 2003-09-17 18:24:47 +00:00
cube 5041ba1a4c Remove a comment that referred to a non-committed part of the patch I
submitted for bin/17613. Ok'd by mrg@.
2003-09-16 09:34:48 +00:00
simonb bb850c0c5e Use HW_USERMEM64 to fetch the amount of memory available. 2003-09-13 10:59:50 +00:00
itojun e1d953a832 support DUMP by sysctl 2003-09-12 07:45:21 +00:00
dsl 58915e2274 If /dev/MAKEDEV is a symlink then preserve the symlink in the mfs /dev.
If /dev/MAKEDEV doesn't exist then try to run /etc/MAKEDEV instead.
Use the (new) '-n inodes' option to mount_mfs and base the size on the number
of inodes and the size of the MAKEDEV script.
2003-09-11 12:51:51 +00:00
dsl 188e64350d Change date on man pages 2003-09-11 12:21:01 +00:00
dsl a83765310a Make mkfs -N work again (was trying to read filesystem).
Correct calculation of number of inodes from density for small filesystems.
Add a '-n inodes' option so that the desired number of inodes can be
explicitly given - init needs this for mfs /dev, -i density is too crude.
2003-09-11 12:19:44 +00:00
dsl 82580bb3ec Try very hard to ensure that the correct superblock will be found by
invalidating a host of other possible superblocks.
2003-09-10 17:25:14 +00:00
itojun 0398a95f59 make it possible to use /kern/ipsec{sp,sa} for dumping policy/SA. it will
workaround the issue with socket buffer size in PF_KEY SADB_DUMP.
2003-09-08 12:34:29 +00:00
agc 76b6c930a4 Make this compile after the recent changes to the kernel. 2003-09-08 09:05:08 +00:00
wiz 0eba47bcd1 Sync usage with man page. 2003-09-08 07:21:59 +00:00
wiz d234eaaab1 Sort options. 2003-09-08 07:21:51 +00:00
wiz da332882ea Add file ... mode to usage. 2003-09-08 07:09:53 +00:00
wiz c557470784 Punctuation nit; bump date for previous. 2003-09-08 07:09:13 +00:00
itojun 8ca90bd4e4 add /kern/ipsecsa and /kern/ipsecsp, which can be inspected by setkey(8).
it allows easier access to ipsecsa/sp.  it works around problem where
setkey -D does not work with large number of ipsec SAs due to socket buffer
size.
2003-09-08 06:51:53 +00:00
itojun 4380703631 make it possible to process files. 2003-09-08 06:18:49 +00:00
wiz 4ae63e1052 Bump date for previous. 2003-09-08 05:21:58 +00:00
itojun 9effb481fb "tagged" policy is not introduced to netbsd-current yet 2003-09-07 22:21:01 +00:00
itojun 967747c406 committed by mistake 2003-09-07 22:20:05 +00:00
itojun 643b0ddea3 warn that port-number does not work for gateway config. PR kern/22715
add reference.  bump date.
2003-09-07 22:18:58 +00:00
itojun ce112dfc4f add -t option for gmt time offset (normally MS-DOS filesystem has timestamp
in localtime, not GMT).  PR kern/22717
2003-09-07 22:09:11 +00:00
wiz 47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
wiz d0b01a96aa New sentence, new line; drop trailing whitespace. 2003-09-06 20:12:41 +00:00
wiz 51e1730356 Punctuation nits. 2003-09-06 20:11:18 +00:00
wiz 495a82c52c New sentence, new line; improve grammar. 2003-09-06 20:09:26 +00:00
jdolecek 06e5ddbb7e if neither -i nor -n option is specified, use the passed argument
as module ID if it's numeric, and as module name if it's not numeric

this saves some typing which bothered me for some years (one too many today)
2003-09-06 19:55:24 +00:00
martin cf6d36c7b6 Make LCP keepalive behaviour configurable. 2003-09-06 19:35:34 +00:00
jdolecek ade4df3adc implement support for forced LKM load, which makes the kernel skip
the version checks, using new -f flag and LMFORCE ioctl

Hopefully the description in the manpage is discouraging enough so that
nobody would dare even _think_ of using forced loads. A warning
message is written to stderr when this is used, just in case.
2003-09-06 19:23:20 +00:00
itojun f189be338c unifdef HAVE_ARC4RANDOM 2003-09-06 12:56:43 +00:00
itojun e2c411ce3c use arc4random 2003-09-06 12:42:00 +00:00
itojun 3f4f8a9b61 s/0x7fffffff/INT32_MAX/ 2003-09-04 15:31:58 +00:00
itojun bb71295ab0 use arc4random(3). it is at least better than random(3)
XXX masked topmost bit so that values don't go negative, is it the right thing
to do?
2003-09-04 15:30:37 +00:00
dsl 426b102381 fsirand is no longer needed. 2003-09-03 19:38:04 +00:00
dsl e6ca38e5ec Ensure the area between the end of the main superblock and the start of the
first alternate superblock is zerod.
Removes any possibility of any programs using a trully out of date
alternate superblock if a filesystem is remade with a larger block size.
2003-09-03 19:29:12 +00:00
dsl 36aa427d2c Randomise di_igen for the first 2 blocks of inodes for non-UFS2 filesystems.
Randomise di_igen for "/" (and lost+found) for UFS2 filesystems.
Ensure nothing from the lost+found inode leaks into the / inode.
2003-09-03 17:08:58 +00:00
wiz feb417a0db Bump date for last. 2003-09-01 04:43:32 +00:00
mycroft 46743e2182 Add prevent/allow commands. 2003-09-01 04:34:16 +00:00
mycroft 4950c2c904 Add a flushcache command -- I need it for my DVD+RW. 2003-09-01 04:24:55 +00:00
dsl 1ce757782d Define and use PRIdaddr for printing disk block numbers.
Should fix bin/22638 for compilation on amd64.
2003-08-29 16:31:30 +00:00
dsl 0f7fa6b1be Update date for last. 2003-08-21 16:02:32 +00:00
dsl 66117d6353 Remove -c maxblkspercg (leaving -c xxx ignored).
-c used to specify the number of cylinders per group
- but newfs has ignored cylinders for a while.
Changing what -c meant is just asking for trouble!
I might add something to let MINCYL be changed.
2003-08-21 15:47:26 +00:00
dsl 870ae687ac Remove unimplemented -n rotational positions
Remove depracated -c cpg (had been fragments per group in newfs.c, but...)
I might add something to let MINCYL (= 4) be configurable.
2003-08-21 15:43:32 +00:00
dsl cff5fdb06e Rework of code that sorts out number of cylinder groups and inodes:
- allows less than 'one fragment per inode' (useful for mfs /dev)
- limits number of inodes to 2^31 (they are stored in an int32_t)
- errors if the number of cylinder groups is such that the cylinder group
  summary won't fit in the first cylinder group.
- ensures that the last cylinder block contains a valid number of fragments
  and inodes, and is not larger than any earlier ones.
- cylinder groups are now created with almost the same size as each other.
Change posted to tech-kern, and no one objected.
2003-08-21 14:55:03 +00:00
dsl beef08b576 Avoid allocating a data buffer the size of the cylinder group summary.
Write the summary every time it fills a fragment - except for the first
sector which is written last.
2003-08-15 15:24:21 +00:00
dsl 8f0618344d Fix layout of printout of alternate superblock list when > 2^32 sectors, use
80 columns (sysinst uses full width these days).
Use {;} instead of , in a couple of places.
Abort if user tries to make a UFS1 filesytem with > 2^31 fragments.
Abort if the cylinder group summary won't fit into the first cylinder group.
Use pread/pwrite and remove a few redundant casts.
2003-08-15 15:07:16 +00:00
itojun d9be8318c9 avoid FD_SET overrun. from openbsd 2003-08-13 08:51:05 +00:00
wiz c2e074ca4b Bump date for last. 2003-08-12 12:25:15 +00:00
dsl 04dec52c29 Mention and cross reference newfs_lfs and makefs. 2003-08-12 10:29:07 +00:00
dsl b4c1c6117c Stop superblock being written to sector 0 for small filesystems.
Honour the '-s size' command option.
Allow an LFS filesystem to be created in a file.
2003-08-12 08:41:36 +00:00
dsl 26461e4412 Put cylinder number 1023 into the mbr for sectors beyond the CHS limit
(rather than encoding the highest CHS addressable sector).
2003-08-10 10:20:08 +00:00
wiz bf2d0ca599 Mention /etc/sysctl.conf. Bump date. Closes PR 22213. 2003-08-07 10:11:02 +00:00
agc 276d62f603 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
agc bf07c8719a Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:11 +00:00
wiz 7539e84445 Bump date for flushall description. 2003-08-07 09:46:17 +00:00
dsl 9b8239809b Exit child process if we fail to 'cd /dev' or 'execl sh MAKEDEV'.
Don't really want two processes in the rest of init!
2003-08-05 09:31:48 +00:00
dsl 42c39f4f19 Make output fit into 80 columns when a partition doesn't end on a cylinder
boundary.
2003-08-04 17:14:50 +00:00
dsl 2ceab48459 Read correct sector when following extended partition chain.
Require extended partition chain to be through increasing sector numbers
in order to abort loops.
2003-08-04 16:51:56 +00:00
jdolecek f462956915 bump date for last 2003-08-02 11:43:21 +00:00
jdolecek 28dd22899a actually enable MNT_GETARGS support 2003-08-02 11:42:20 +00:00
jdolecek 62e0ed44c8 Allow separate masks for files and directories. Useful e.g. to turn
the execute bit off for files, but keep search permission for directories.
Change contributed in PR kern/21538 by Pavel Arnost, based on some FreeBSD
patches.
Further manpage changes, and backward-compatibility adjustments done by me.

Also fixes PR kern/16778 by Johan Danielsson, and PR kern/3400 by Rick Byers
2003-08-02 11:41:19 +00:00
jdolecek 913ed381f5 g/c all traces of FreeBSD-specific code - it only obfuscated the code without
any real benefit
2003-08-02 10:11:47 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem ebf8a4f11a move ${DEPENDSRCS} target to after .include <bsd.*.mk> 2003-07-29 01:45:33 +00:00
lukem eb51573bd7 Use ${DEPENDSRCS} as a target instead of .depend, now that
<bsd.dep.mk> builds .depend from .dep files.
2003-07-28 15:25:02 +00:00
salo b75abedac4 netbsd.org->NetBSD.org 2003-07-26 19:38:45 +00:00
mrg 5a777a5e59 add another (void *) cast to appease gcc3.3 2003-07-26 15:28:24 +00:00
itojun 182a98314c support new algorithms 2003-07-25 10:06:09 +00:00
itojun c9ecfbe3a4 fix packet loss rate computation 2003-07-25 06:01:44 +00:00
ws ebd1f55e89 Only compare the interesting part of the bootblock with its backup. 2003-07-24 19:25:46 +00:00
itojun e45b6fad8e include des.h, not kerberosIV/des.h 2003-07-23 21:10:36 +00:00
itojun aada1051de support hmac-sha2 2003-07-22 03:38:14 +00:00
itojun 453e29a18a cleanup 2003-07-22 03:37:59 +00:00
jrf ce22377a7e This is an updated submitted patch originally written by Jim Rees
and sent in by Greg Hudson as seen in PR misc/3227. Basically what it
does is adds a flushall option which deletes all but localhost routes.
This is done by andoring in a flag called doall (1 means do all routes
including gateway, 0 means do a regular flush). I have seen some
platforms that do this. I tested it out on ipv4 only, it works as
advertised. Commit was approved by christos@.
2003-07-19 01:36:47 +00:00
dsl ae60f83e33 Remove old i386 mbr stuff (move to arch/i386/stand/mbr a while ago)
mbr.8 moved to src/share/man/man8/man8.i386
2003-07-16 11:11:49 +00:00
dsl 02af72a142 Fix code that detects bios geometry from mbr table. 2003-07-14 09:32:12 +00:00
lukem a21d1e7a14 xref dkctl(8) 2003-07-13 09:55:34 +00:00
lukem 6a52ab7b0e also reference disklabel(5) 2003-07-13 09:53:10 +00:00
itojun 6950184129 use bounded string op 2003-07-13 08:23:39 +00:00
itojun 49fbaf537e use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
2003-07-13 08:22:55 +00:00
itojun 0e4dc5229d use bounded string op 2003-07-13 08:16:15 +00:00
itojun 8883e1fb40 use bounded string op 2003-07-13 08:05:58 +00:00
itojun b5bc655b98 strlcat 2003-07-13 07:59:24 +00:00
itojun a9282a99c0 die if asprintf fails to malloc 2003-07-13 07:58:19 +00:00
itojun 09c1e9bc45 use bounded copy (a few unbounded copy remains - need work) 2003-07-13 07:48:01 +00:00
itojun 354140d884 remove obsolete comment 2003-07-13 07:45:27 +00:00
itojun 8ff221767c asprintf is easier. plug memory leak 2003-07-13 07:44:33 +00:00
itojun d90a2369ab use bounded string ops 2003-07-13 07:39:39 +00:00
itojun 658b0219c1 snprintf 2003-07-13 07:38:12 +00:00
itojun 0b04aee3ea use bouded string ops 2003-07-13 07:37:02 +00:00
atatat fc035bc8fd Allow _ in tags 2003-07-12 23:02:59 +00:00
itojun 59b2dcde2e asprintf() is easier than malloc + sprintf 2003-07-12 16:52:22 +00:00
yamt 884f970fae in ckinode(), use idesc->id_number instead of dino.di_u.inumber
since the latter is invalid for pass2 and vget can return invalid vnode
for inode number 0.
2003-07-12 16:13:38 +00:00
itojun d99433c2b5 use bounded string ops 2003-07-12 14:48:10 +00:00
itojun 09401b303a use asprintf, which is easier 2003-07-12 14:46:41 +00:00
itojun efb986d740 sprintf can return negative 2003-07-12 14:36:07 +00:00
itojun ca9297afc4 use strlcat/strlcpy 2003-07-12 14:33:55 +00:00
yamt a7f5ddbf64 in lfs_raw_vget(),
- don't leave references into free'ed memory region. (fix SIGBUSes)
- plug a memory leak.
2003-07-12 12:28:23 +00:00
yamt e01ace1f2e - don't assume that malloc'ed memory is zero-filled.
- LIST_INIT {dirty,clean} block lists.
2003-07-12 11:57:59 +00:00
yamt 1d5f020689 fix a null dereference on stale inode. 2003-07-12 11:49:04 +00:00
yamt c992c60208 only read superblock (ie. struct dlfs) from disk and
initialize rest of struct lfs by hand.
(this shouldn't cause a real problem since if superblock is valid,
LFS_SBPAD-sizeof(struct dlfs) bytes after it is always zero-filled, though)

PR/22123 (Izumi Tsutsui)
2003-07-12 11:47:05 +00:00
yamt 96782bb1fd don't use uninitialized variables.
PR/22123 (Izumi Tsutsui)
2003-07-12 11:41:15 +00:00
dsl 7db2cff2fd Allow for the netbsd partition being in the extended partition list. 2003-07-07 13:05:46 +00:00
dsl 93e88fd2eb Only look at each pair of CHS values once when trying to guess geometry. 2003-07-07 11:45:00 +00:00
wiz f4e5486eb2 Bump date for last, and replace some \*[Lt]/\*[Gt] with .Aq. 2003-07-04 13:32:13 +00:00
wiz 6e047dae78 Bump date for last. 2003-07-04 13:09:58 +00:00
ragge 9e60a88e86 Add somaxkva. 2003-07-03 20:15:28 +00:00
itojun e97be76fa1 strcat -> strlcat 2003-07-03 03:04:04 +00:00
christos 9dd592469e Avoid code duplication by factoring out the open/map open/write/unmap functions. 2003-07-01 16:44:48 +00:00
lukem b96069c077 Always compile in support for attempting to obtain the major device
number of the console from sysctl("machdep.console_device"), rather
than making in optional on the (unused) #ifdef DEBUG.
Certain platforms do not have the console at makedev(0,0) (including
many arm32 and some sh3 platforms), so the "mfs MAKEDEV" hack would
have failed on those.

Noted in private discussion with Quentin Barnes.
2003-07-01 15:24:22 +00:00
itojun 5af08a4965 more error traps on malloc failure. accept "-E null".
various pedantic checks.  from kame
2003-07-01 07:20:12 +00:00
simonb 775170c02f Line up the cylinder numbers in the printlabel output a bit better. 2003-07-01 05:40:54 +00:00
wiz 52270a7fd9 Add Ns. 2003-06-30 11:49:54 +00:00
wiz 9f3dc3febc Remove unnecessary space before dot. 2003-06-30 11:48:05 +00:00
wiz d6967e3b9b Quote punctuation so it gets marked up. 2003-06-30 10:46:22 +00:00
wiz 217ca657dd Quote macro candidate. 2003-06-27 23:23:51 +00:00
wiz 6dd6d12d66 Add Ns. 2003-06-27 23:06:50 +00:00
wiz 8a0999a756 Remove superfluous "". 2003-06-27 23:02:16 +00:00
agc c2a3b5ec84 Add NetBSD RCS Ids. 2003-06-23 11:53:35 +00:00
simonb 7eb2ec40b2 Remove the KERN_DRIVERS case handler (prototype code?). 2003-06-17 03:34:23 +00:00
dsl f8f6959024 Print hw.cnmagic as escaped hex bytes (unless -n given).
Change 'special' to be a numeral not a bit, it isn't ever used as a bit
and I can't see why it should ever be used that way.
2003-06-16 21:52:58 +00:00
christos dffc5f5133 PR/21860: Robert Elz: ifconfig doesn't allow addr/N notation for INET6 2003-06-11 19:51:31 +00:00
christos 072bca2c13 PR/21856: Robert Elz: Changes to route(8) to allow /n instead of -prefixlen
for INET6
2003-06-11 15:45:20 +00:00
dsl ee0a07c072 Make writes to the in-core label persist after mbrlabel closes the disk. 2003-06-07 10:03:39 +00:00
cjep 100bffb736 Fix typo. Noted by Sean Boudreau on tech-net. 2003-06-06 14:18:40 +00:00
joda e5986b088f add missing . before Fl 2003-06-03 12:35:54 +00:00
itojun 627957eb53 permit foo/bar notation, like "route add 10.0.0.0/8 127.0.0.1".
originally by provos
2003-06-03 04:41:42 +00:00
thorpej 56962fed64 Avoid a strict-alias warning in gcc 3.3. 2003-05-31 23:42:23 +00:00
itojun 1fc7a4943e correct bad RFC ref. KAME problem report 480 2003-05-27 02:37:24 +00:00
lukem 9014bdbce6 * Document $RCMD_CMD in environ(7).
* Cross-reference rcmd(1), rcmd(3), and environ(7) as appropriate.

Should fix [bin/21670] from Geoff Wing.
2003-05-26 10:18:39 +00:00
lukem 35c2bddeea If RESCUEDIR is defined, use that as an alternate path to sh and mount_mfs,
and prepend RESCUEDIR to the default PATH.
(This replaces my _PATH_ALTSHELL mods from rev 1.52 of init.c)
2003-05-26 09:34:55 +00:00
itojun eb44a81d7f permit scoped addr notation in policy string (-P esp/tunnel/foo%scope-bar%scope/use). from francis dupont. sync w/kame 2003-05-22 04:01:49 +00:00
wiz 15e9ee5dc8 Add some missing words (like articles), remove duplicate word; fix some nits. From jmc@openbsd. 2003-05-20 10:18:50 +00:00
itojun f5878476d9 simplify by strlcpy 2003-05-18 02:11:13 +00:00
itojun 8138cbd1bf simplify more 2003-05-18 02:07:20 +00:00
itojun ebf587df1a simplify by strlcpy/cat 2003-05-18 02:06:28 +00:00
itojun 262bdee727 do not hardcode buffer size 2003-05-17 23:16:47 +00:00
itojun 00868410fd asprintf is easier 2003-05-17 23:14:42 +00:00
itojun 604ac268ac use snprintf 2003-05-17 23:10:57 +00:00
itojun fe09a0efcb use strlcpy 2003-05-17 23:03:28 +00:00
itojun 9cbeabfe77 strlcpy [a few mistakes found] 2003-05-17 23:02:28 +00:00
itojun aa5672d8c5 sscanf overrun 2003-05-17 01:02:01 +00:00
lukem 3b7c75cfba Change -b from skipping POINTTOPOINT|LOOPBACK to skipping ! BROADCAST.
Fixes my [bin/21604]
2003-05-17 00:48:13 +00:00
yamt a1d2fd4ed9 fix a typo that prevents -o wsize=nnn to work. 2003-05-16 15:33:45 +00:00
itojun 68452c0c92 assume presense of getifaddrs(3). 2003-05-15 14:44:57 +00:00
wiz d43e332f1e setup -> set up. 2003-05-14 12:11:03 +00:00
dsl b081987b73 delete a diagnostic printf that was accidentally left in 2003-05-14 11:24:05 +00:00
jmc c9bb642d58 Fix typo 2003-05-09 23:05:53 +00:00
wiz 8cf282a707 Use .Nm instead of .Xr mknod, and sort options in HISTORY (incl. mdoc and grammar nit fixes). 2003-05-09 09:15:20 +00:00
petrov 552633af59 Fix format string. (no % in PRIx..). 2003-05-08 18:39:09 +00:00
christos 0c737a5345 /sbin/wizd points out that it is CYGWIN not GYGWIN. 2003-05-08 14:47:19 +00:00
christos 96618476db deal with cygwin's dev_t (John Gordon) 2003-05-08 13:29:39 +00:00
lukem 670700cfd8 2.0, not 1.7 2003-05-08 11:36:28 +00:00
dsl 4f32e6a229 Add -g gid -m mode -u uid so that MAKEDEV can run when chown/chmod are
not available.
Add -r and -R to do two (different) sensible things if node exists.
From a discussion with Lukem.
2003-05-08 11:34:19 +00:00
lukem 2ac07ea296 Move major_netbsd(), minor_netbsd(), and makedev_netbsd() from
pack_dev.c to pack_dev.h, so that #include-rs of the latter can use them.
2003-05-08 09:38:03 +00:00
fair baafa0e128 Add some mdoc macros. Add text from PR 13878, modified. 2003-05-07 05:19:44 +00:00
wiz b6bcb58a8b Bump date for last. 2003-05-06 08:23:57 +00:00
wiz c94730c38a MBR, not mbr. 2003-05-06 07:56:03 +00:00
yamt 93fa2d7018 remove _KERNEL hack. 2003-05-05 13:23:10 +00:00
jmmv 6c34824459 Explicitly close open file descriptor before exiting. 2003-05-04 11:54:59 +00:00
christos e6cde3e511 print masks and modes in octal. 2003-05-03 15:37:07 +00:00
gmcgarry 534f9a7a52 Document -I option. From Richard Rauch <rauch@math.rice.edu>
in PR#11890.
2003-05-02 08:09:35 +00:00
atatat 3685b7582e Convert to using gettimeofday(2) instead of time(3) to get the current
time, and stuff as much precision as possible into as many places as
possible.  This includes setting the atime, mtime, and ctime on inode
#2 of a freshly created file system, and the birthtime on a new ffs2
filesystem.

Previously these would all be left at zero, and since the birthtime
only gets set when the inode is allocated (and since inode #2 never
gets recycled), inode #2 would always have a birthtime of the epoch.
2003-05-02 03:26:11 +00:00
dsl 5e53f766f8 Change a couple of .Em to .Ar 2003-05-01 13:36:25 +00:00
wiz 0682f1a427 Replace some raw roff with mdoc. 2003-05-01 13:01:17 +00:00
wiz 0d14e41651 Improve formatting for [/bootmenu], requested by dsl; add some commas. 2003-05-01 12:55:52 +00:00
fvdl 617c9472c7 Fix byteswapping issues in dirindir(); mostly from Enami Tsugutomo. 2003-05-01 11:29:55 +00:00
fvdl 161b371dad Swap the right disk block in mapdirs() for the UFS1 case. From Enami. 2003-05-01 10:59:20 +00:00
dsl 315515ebe4 a mbr -> an mbr 2003-05-01 10:43:58 +00:00
wiz c662d486a9 mdoc fix, use \*[Lt]/\*[Gt], sort SEE ALSO, some other nits. 2003-05-01 10:43:14 +00:00
wiz b3d7fe267b Drop trailing space. 2003-05-01 09:50:12 +00:00
bjh21 b2fbd85bee Remove some unused variabled from get_params_to_use() in the !i386 && !amd64
case.
2003-05-01 09:23:30 +00:00
dsl 93174a8c33 Update to match new mbr code 2003-05-01 08:40:17 +00:00
dsl c5bd7c9dfd i386/amd64 mbr is now built in sys/arch/i386/stand/mbr 2003-04-30 19:50:42 +00:00
dsl 8defedc8ba Don't descend into mbr_bootsel.
i386/and64 mbr code is built in arch i386/stand/mbr
2003-04-30 19:49:01 +00:00
dsl fa01152676 Rototilled fdisk that supports:
- editing of the extended partition list
- user friendly default start/size for new partitions
- partition start/size input in sectors, cylinders or MB
- bootsel menu names configured with paritition bounds
- partition update loop asks used which partition to change
  (instead of asking about each partition in turn).
- detection (and erroring) of overlapped partitions.
- automatic installation of correct mbr_xxx code (after prompting user)
2003-04-30 19:47:10 +00:00
dsl 6ac09f276d Move some definitions from fdisk.c to disklabel_mbr.h so they don't have
to be duplicated elsewhere (eg in mbr.S).
Modify fdisk.c so that it builds with the new disklabel.h
2003-04-30 10:29:51 +00:00
wiz 57af6bd854 Remove superfluous +. From FUKAUMI Naoki in PR 21390. 2003-04-29 16:39:00 +00:00
fvdl 043f21d9ea x86_64 -> amd64 2003-04-26 19:14:17 +00:00
fvdl 0945a6df17 x86_64 -> amd64 2003-04-26 19:02:50 +00:00
jdolecek eb4e67de4b don't compile this -static, depend on MKDYNAMICROOT check in ../Makefile.inc
for that
2003-04-26 12:46:35 +00:00
bouyer e43e53604e Add a findblk command, which list the inode(s) owning the disk sector(s)
passed as argument.
2003-04-26 08:42:49 +00:00
ragge 46943c2cf6 Try first to use /dev/ksyms to get kernel symbols, if that fails mutter a
bit and fallback to the old way.
2003-04-24 20:18:31 +00:00
fvdl fe36fefa1a Oops. The clearinode macro had the UFS2 case reversed, causing it to
zero out two inodes in the plain FFS case, since UFS2 dinodes are
twice as big.
2003-04-24 20:08:25 +00:00
wiz 287057db85 Bump date for last. 2003-04-24 12:19:06 +00:00
perry b23b1bcc57 Document what happens when you don't have any dependency lines in a
file, and downgrade "must" to "should" in a couple of places.
Answers a documentation complaint from Jeremy C. Reed in PR misc/21251
2003-04-24 03:15:45 +00:00
jrf 6867af7aad This addresses PR 17613 when certain methods of adding routes would
muck up the routing tables. The patch was submitted by Quentin Garnier
<netbsd@quatriemek.com> and tweaked a little after it was reviewed
by Christos Zoulas <christos@netbsd.org>. Final change/commit approved
by Christos.
2003-04-21 13:42:50 +00:00
itojun 16435cdb98 strcpy/sprintf cleanup. from openbsd 2003-04-21 08:54:42 +00:00
dbj 2e6348f3d8 add a SIGINFO handler progress indicator 2003-04-21 07:58:55 +00:00
christos 336e3096f2 PR/5680: Markus Illenseer: Mounting and using broken mfs results into kernel
panic
Fixed by checking two return cases from alloc() that were not checked before.
2003-04-20 19:55:33 +00:00
christos c1c48aec57 PR/5544: Anders Magnusson: Init segfaults when hupped in single user.
- fix so that session_db is not de-referenced when null, and other
  possible null pointer dereferences.
- ignore hup and tstp in single user mode.
2003-04-20 17:16:31 +00:00
tls 539a3fbb0a The sysctl returning the amount of memory in the system returns "int",
which is silly.  Luckily, it really does return the correct result if
interpreted as an unsigned int.  This change lets dump work on 32-bit
systems that have more than 2GB of RAM.
2003-04-19 23:29:12 +00:00
christos 7e60cdc11e add tcp.ident. 2003-04-19 21:55:48 +00:00
wiz dab156a456 This command is not normally executed at boot time.
Closes PR 21225 by Aidan Kehoe.
2003-04-18 14:53:50 +00:00
thorpej 817eb1cb2e We need -I., too. 2003-04-17 22:12:50 +00:00
fvdl 9f959f87e7 Call MAKEDEV with "init" 2003-04-17 18:04:47 +00:00
fvdl 38f661d48d -I. -> -I${.CURDIR} 2003-04-17 10:55:43 +00:00
lukem 85828b646a clear errno before strto(u)l() if we're going to test it for ERANGE afterwards 2003-04-17 04:01:56 +00:00
wiz 472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
martin eb1ff84c33 Until timeval.tv_sec becomes a time_t, we can't pass a pointer to
it to ctime(). tv_sec is long, while time_t is int on some archs.
2003-04-16 13:32:58 +00:00
wiz 037dbec1f7 New sentence, new line. 2003-04-16 13:05:01 +00:00
wiz 77c7ae1259 Drop superfluous .Pp; bump date for last. 2003-04-16 13:04:27 +00:00
wiz 1745a4efd2 Combine no-argument options in SYNOPSIS. 2003-04-16 12:55:15 +00:00
wiz 3b71168fc8 Bump date for last. 2003-04-16 11:58:43 +00:00
wiz 843df8bc67 Bump date for last-but-one; remove superfluous .Pp. 2003-04-16 10:09:47 +00:00
dsl 1608697b9e Fix printf formats and kill unused variable to make it compile 2003-04-16 08:39:56 +00:00
darrenr 8745a98a43 Don't forget to increment the iterator when going around a loop 2003-04-15 19:07:37 +00:00
darrenr 543eb62ec5 Add a note to "retry" option about device requirements. 2003-04-15 18:39:58 +00:00
darrenr 8dac8843a5 Implement (and document!) "dkctl <dev> badsector .." to `manage' the bad
sector information in the kernel.  Doing this uncovered some shortcomings
that should have been pretty obvious with the code committed prior, addressing
the major kludge with a new struct - disk_bacsecinfo to be passed into
DIOCBSLIST.
2003-04-15 18:27:26 +00:00
itojun 3fbac68bea use snprintf. there are more... 2003-04-15 08:20:17 +00:00
itojun 64e132e781 array seems too small 2003-04-15 07:37:34 +00:00
itojun 84490858f9 correct questionable use of strncpy(). 2003-04-15 07:36:14 +00:00
itojun 781846fcdb use NI_MAX*. 10 is not enough for port number. sync w/kame 2003-04-15 07:32:06 +00:00
elric 3c7e4881c4 Fix typo. params files are not stored in /dev/cgd/ 2003-04-15 06:43:36 +00:00
fvdl 7b402ff9df If an alternate superblock is used, update the standard one correctly. 2003-04-14 18:50:52 +00:00
itojun 506c5eeb9e permit -s 0. from Maxim Konovalov 2003-04-14 10:18:37 +00:00
yamt f5f20840e2 save and restore errno in signal handlers. 2003-04-13 10:22:40 +00:00
christos a16e9fc559 add checkinterface 2003-04-12 04:32:54 +00:00
perry 765e98ca6e Document the -v and -z flags. 2003-04-12 01:08:28 +00:00
perry d229e19ca4 Add an option (-z) like -v except that it clears the input/output
stats after printing them.
(Basically this just calls SIOCZIFDATA instead of SIOCGIFDATA).
Submitted by Jean-Edouard BABIN in PR bin/21078
However, he suggested using -c, and cgd (reasonably) noted that -z for
"zero" was probably more reasonable.
I've also changed the code very slightly.
2003-04-12 01:07:43 +00:00
christos c54d6ca813 PR/1472: David Carrel: Add option to specify the nfs port.
This was not done, I added the functionality to be able to parse
port=num in the options. While I was there, I added this for all
the other numeric options: rsize, wsize etc.
2003-04-11 17:39:09 +00:00
enami e89481b248 Correctly detect a UFS1 file system of non-native endian. 2003-04-11 10:21:40 +00:00
jdolecek 40d3f26f8c desupport LMRESERV_O, anything relying on it doesn't have chance of working
anyway due to numerous kernel structure changes
2003-04-11 07:49:31 +00:00
elric 8105111443 If reading an old style parameters file then default a missing
keygen_iteration to 128.  This will not default the iteration count
on a new style parameter file as it is an error in the new style
to fail to specify the iteration count.

Addresses PR: bin/21056
2003-04-10 05:45:29 +00:00
lukem 04a792a536 fix typo introduced in previous (print "addr=" instead of "ddr=") 2003-04-10 04:40:38 +00:00
fvdl 774a28f33f Correctly deal with directories that need indirect blocks by adding
some code I missed in the UFS2 commit. Should fix false positives
seen by fsck_ffs on clean filesystems.

Thanks to Takahiro Kambe for debugging help.
2003-04-09 12:49:28 +00:00
fvdl e06c710852 Swap the right blocks in an inode in the byteswapping case. 2003-04-08 14:59:52 +00:00
fvdl bbc00e975a Fix reverse test for UFS2 in the blks command. 2003-04-08 14:46:21 +00:00
fvdl 2812e7d837 Since the size passed in may be different from the fs blocksize, just
allocate a buffer each time instead of using a static one.
2003-04-08 10:02:23 +00:00
fvdl 0835d456dd dblk should be static. Fixes PR 21020, by Geoff Wing. Patch supplied
by him.
2003-04-08 09:16:19 +00:00
fvdl 253e7c6b6a Don't print the version of the argument structure, it's easily confused
with the NFS version.
2003-04-07 13:31:17 +00:00
wiz d0ca8fad45 Some casing changes, and use Er for EINTR. 2003-04-06 19:42:59 +00:00
fvdl 750ed85d47 Write update some old fields when writing the superblock, similar to
ffs_oldfscompat_write() in the kernel. Use the old totals when
time < old_time (i.e. an old kernel or fsck wrote the filesystem last).
When setting the date back on a new kernel, that works out ok, since
new kernels always update both fields.
2003-04-06 17:23:25 +00:00
lukem ea56af7b9d Tweak behaviour introduced in rev 1.50;
*	by default, warning messages go to stderr
    *	if -A or -a is used, send warning messages to stdout instead.

The behaviour in 1.50 meant that
	somevar=`sysctl -n machdep.booted_kernel 2>/dev/null`
could end up with $somevar="machdep.booted_kernel: the value is not available"
rather than the more useful $somevar="".

(This way, "sysctl -A | grep ..." is still useful.)
2003-04-06 05:19:03 +00:00
fvdl 8e4c90f49a Skip checks for old 4.2BSD filesystem; as it stands, we can't deal with
writing them. Could be fixed, but doesn't have a high priority.
2003-04-05 13:45:21 +00:00
wiz 9cdee53232 Some minor fixes from Soren Jacobsen in PR 21017. 2003-04-05 09:22:22 +00:00
wiz 52c7291619 Bump date. 2003-04-04 19:02:44 +00:00
perry aa62e15ec9 1) Remove a reference to a 30 second delay left when Ignatios
backed out a 30 second delay from the program.
2) Add a CAVEATS section noting that the command cannot and should not
   be stopped once started.
2003-04-04 18:13:47 +00:00
perry cf423b3982 1) To eliminate a race condition in which the user could conceivably
try to quit or stop the program right at the moment after the it
   sends a TSTP to init, move the kill(1, TSTP) to right after we
   block most signals, instead of doing it just before.
2) To add TSTP to the signals we ignore. Once we start halting, it
   really is not safe to try to stop at all. You can't change your
   mind halfway through -- init will already be stopped and a TERM
   will have been sent to everything on the system within
   milliseconds of starting.
3) Adjust one comment for TNF
2003-04-04 17:43:08 +00:00
fvdl 5f7172ed40 When fixing the cstotal structure, use the right size to copy it back.
Also, remove some accidentally committed debug code from the previous
commit.
2003-04-04 15:02:40 +00:00
fvdl 373feac024 Initialize cg_irotor correctly in newcg, to avoid false positives
for bad cylinder groups.
2003-04-04 13:45:21 +00:00
jdolecek 7e4ff06b35 install the example dot.nsmbrc
suggested by Masao Uebayashi and others, also in FreeBSD docs/35649
2003-04-04 07:50:43 +00:00
christos 628c00a0ec make this compile again. 2003-04-03 14:55:16 +00:00
wiz 4abefdc12f Sort options; mention -O default; grammar improvements; use more macros. 2003-04-03 14:50:35 +00:00
fvdl 645eff4a6f The -r option is no more, so delete it from the synopsis line too. 2003-04-03 14:26:11 +00:00
tron ef15ca7b9d Document extended "-O" option after UFS2 import. 2003-04-03 14:17:26 +00:00
jrf dee179a37f Made a note in the code about the -d and -d options brought up in
PR 18674. Thanks to Chris Jones for pointing it out.
2003-04-03 02:39:50 +00:00
he e75cb67772 On LP64 hosts, iswap64() result is "long int", so cast result to (long long)
before printing with %lld.
2003-04-02 22:27:09 +00:00
he bfd92e95d2 The new UFS2 code uses memset(), so include <string.h> for prototype. 2003-04-02 22:25:56 +00:00
dbj 2e948b5e58 On Apple UFS filesystems, change the default fragment size to 1024
and the default block size to 4096.  Issue a warning if values
are used that will not work on Darwin.
2003-04-02 20:48:13 +00:00
fvdl 42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
fvdl 96757427c6 Fix range check for the default boot option case. 2003-04-01 19:39:13 +00:00
perseant acddf8ff0b Check inode free list tail pointer as well as head pointer, and write both
into the CLEANERINFO block of the Ifile as well as into the superblock.
Make preen update both superblocks.
2003-03-31 19:56:59 +00:00
wiz 0acfa3bb9e Consistently spell occurrence with two rs. 2003-03-29 22:48:37 +00:00
perseant f8b4df4569 Fix some accounting problems when preening, since preening skips phases
1-4 entirely.  Make preen run phase 0, since the Ifile is so important
and the test so quick.
2003-03-29 00:09:43 +00:00
perseant 42b9009195 Make vmsg non-static, so it can be used directly by fsck_lfs. 2003-03-28 08:12:38 +00:00
perseant ba10361ab2 Add working writing ability to fsck_lfs, including roll-forward, based on
a partial-segment writer ported from the kernel.
2003-03-28 08:09:52 +00:00
perry 1fbcf39738 do proper rounded packet loss calculations.
From Robert Elz in PR #20885
XXX This should be sent back to KAME
2003-03-27 16:15:44 +00:00
taca a89b208abd Since "host" is used when RRESTORE is defined, enclose variable definition
with "#ifdef RRESTORE" and "#endif".
2003-03-27 14:11:51 +00:00
lukem fb1a99ccf5 Remove "setgid tty" and references to utmp code from usr.bin/who. 2003-03-27 13:58:49 +00:00
lukem ec029d0aa9 Use "wall -g operator" (instead of private code) to broadcast() messages to
members of the operator group.
Don't install "setgid tty", and remove now unnecessary gid/egid swapping.
Remove utmp trawling code pulled in from usr.bin/who.
The Code is now simpler, and more portable (without the utmp cruft) too.

This is derived from similar work in OpenBSD.
2003-03-27 13:56:46 +00:00
elric 7687f10a7a Quick bugfix:
o  need to do keygen_filldefaults() in generate_convert no
	   matter what, not only if there are no existing keygen
	   methods in the new parameters.
2003-03-24 03:12:22 +00:00
elric 8c6033d202 substantial rototill of the code.
o  added new features:
		o  -G:  generate a new paramsfile that produces the same
			key as the old paramsfile,
		o  ffs verify_method,
		o  multiple keygen methods that are xor'ed together
		   (for n-factor authentication), and
		o  calibrating the iteration count of PKCS#5 PBKDF2 to
		   the current machine's speed.
	o  changed paramsfile format to allow for the new features.
	o  replaced open-coded parser with yacc grammar.
	o  lots of supporting changes.
	o  updated documentation to reflect new features and new
	   paramsfile format.
2003-03-24 02:02:49 +00:00
jdolecek ded9445270 no need for -I${MOUNT} & .PATH: ${MOUNT} now neither 2003-03-22 19:09:39 +00:00
tron 006d0d43aa Remove "getmntopts.c" from list of source files. getmntopts(3) is in
"libutil" now.
2003-03-22 15:34:44 +00:00
mrg af585b8553 bump .Dt [from wiz] 2003-03-22 15:26:38 +00:00
mrg f3b8a67c63 add a "-f configfile" option. the config file contains individual lines of
parameter=value pairs normally passed on the command line (# and \
continuation also works, yay fparseln), one per line.  now you don't have
to run a program with a password on the command line.
2003-03-22 14:38:15 +00:00
jdolecek 1edd42a9d2 move getmntopts(3) to libutil, build and install also it's manpage
bump libutil minor
adjust individual mount_*/Makefile to use libutil getmntopts(3)
2003-03-22 12:43:57 +00:00
jdolecek 899bce0921 use <> rather than "" for #include mntopts.h 2003-03-22 11:15:45 +00:00
christos 34d0e11123 put this back. 2003-03-19 18:35:08 +00:00
christos f6bd12363e union moved. 2003-03-19 18:25:15 +00:00
wiz 3d147c386a Bump date for last change; new sentence, new line. 2003-03-19 10:37:55 +00:00
bouyer 4a3c894eef Fix 2 bugs:
- initialise stp when the bridge is turned up, without this stp will keep
  all interfaces disabled in a sequence like:
  brconfig bridge0 add if0 add if1 stp if0 stp if1 up
- s/BRDGSPRI/BRDGSIFPRIO in brconfig.c:cmd_ifpriority()

add a command (ifpathcost) to change the stp path cost of the STP path cost of
an interface. Display the interface path cost with the others STP parameters.
2003-03-19 10:34:33 +00:00
wiz 676e42ffce Consistent tab usage. 2003-03-17 08:00:38 +00:00
wiz 83de4abed2 Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
2003-03-15 23:48:27 +00:00
wiz 4163cb2aee Fix some typos. From Igor Sobrado in PR 20722. 2003-03-15 22:25:37 +00:00
wiz 7d23ed38db IPsec, not ipsec. From Igor Sobrado in PR 20722. 2003-03-15 22:24:18 +00:00
wiz 49e9f32df4 source, not sourse. From Igor Sobrado in PR 20721. 2003-03-15 19:29:11 +00:00
wiz 84cb70148f Correct program name in comments. 2003-03-10 09:23:50 +00:00
wiz d686d8626e Sort sections; "file system" instead of filesystem; mdoc improvements;
new sentenence, new line.
2003-03-10 09:23:23 +00:00
fvdl 74cc14e0d0 Quell formwat warning for LP64 for the diskinfo printf. 2003-03-07 00:42:04 +00:00
thorpej 5fbe4e61de hw.physpages -> hw.physmem64, hw.userpages -> hw.usermem64 2003-03-06 20:36:51 +00:00
wiz 049950fd97 New sentence, new line. 2003-03-03 06:50:18 +00:00
thorpej 3cdf0a27ee Document net.inet.tcp.init_win_local. 2003-03-01 04:43:42 +00:00
matt 25b98a109b Eliminate a -Wshadow warning 2003-02-28 05:50:33 +00:00
perseant eab869e1c0 Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
2003-02-27 19:22:36 +00:00
thorpej b4271997ce Document hw.physpages and hw.userpages. 2003-02-27 01:42:10 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz a9f7f104b6 Split .Nm with other macro arguments on two lines. 2003-02-25 07:53:39 +00:00
simonb 668973e677 Use the PRId64 format to print a daddr_t. 2003-02-23 05:21:18 +00:00
perseant 0cfa2c5369 Discourage the creation of new LFSv1 filesystems. 2003-02-23 04:53:17 +00:00
perseant 8685c52d63 Make the "-O" (start filesystem offset) flag to newfs_lfs work correctly,
and update fsck_lfs and dumplfs to deal with it.  Note that while the argument
to -O is given in disk sectors, it must be a multiple of the fragment size,
and although it can be lower than the label or superblock, it can't intersect
either.
2003-02-23 04:32:05 +00:00
lukem 6ddd712ab0 (cross)builds on current ok 2003-02-23 00:27:51 +00:00
lukem 82aaf00052 minor cosmetic tweak 2003-02-23 00:26:02 +00:00
martin 416cebb2dc This program deals with on-disk structures.
s/daddr_t/int32_t/g for now (UFS2 will need other changes as well).
2003-02-21 23:55:38 +00:00
fvdl bb8bd280d4 Only check relevant fields when comparing the superblock to an alternate
superblock. Avoids false positives should fsck_ffs be run on a filesystem
that was created after the UFS2 code has been merged.

This commit is mostly a forward compatibility patch that can be pulled
up in to the 1.6 branch.

From Kirk Mckusick in FreeBSD (setup.c rev. 1.30). Original commit message:
========
When checking the alternate superblock, we used to copy any fields
that might have changed, then did a byte-by-byte comparison with
the alternate. If any unused fields got used, they had to be added
to the exception list. Such changes caused too many false alarms.
So, I have changed the comparison algorithm to compare a selected
set of fields that are not expected to change. This new algorithm
causes far fewer false hits and still does a good job of detecting
problems when they have really occurred. In particular, this change
should ease the transition to kernels supporting UFS2 which make
some significant changes to the superblock.

Sponsored by:	DARPA, NAI Labs
========
2003-02-21 15:15:49 +00:00
jtk ec57cc7eb3 Preliminary version of resize_ffs, based on der Mouse's fsresize tool.
I didn't have time to clean it up completely before my legal status
w.r.t. open source projects goes into limbo for a while.  Other
developers are encouraged to play with the tool and get it into
release-worthy shape.

TODO list (see TODO file)

* verify it builds on -current, put it into release lists/etc. and src/sbin/Makefile
  (built & tested on 1.6.1)
* make it ask questions before doing any work (confirm)
* create regression test suite (see discussions on tech-kern and
  developers) and fix any bugs
* verify conversion to ANSI C didn't break anything
* port to UFS2
2003-02-21 04:08:54 +00:00
jdolecek 55faf5989f add mount_smbfs(8) 2003-02-18 20:35:28 +00:00
jdolecek e0ef9a798d add 'noatime' to list of supported mount options
fixes PR bin/20411 by KOIE Hidetaka
2003-02-18 13:16:48 +00:00
perseant b397c875ae Add code to UBCify LFS. This is still behind "#ifdef LFS_UBC" for now
(there are still some details to work out) but expect that to go
away soon.  To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:

* Create a writer daemon kernel thread whose purpose is to handle page
  writes for the pagedaemon, but which also takes over some of the
  functions of lfs_check().  This thread is started the first time an
  LFS is mounted.

* Add a "flags" parameter to GOP_SIZE.  Current values are
  GOP_SIZE_READ, meaning that the call should return the size of the
  in-core version of the file, and GOP_SIZE_WRITE, meaning that it
  should return the on-disk size.  One of GOP_SIZE_READ or
  GOP_SIZE_WRITE must be specified.

* Instead of using malloc(...M_WAITOK) for everything, reserve enough
  resources to get by and use malloc(...M_NOWAIT), using the reserves if
  necessary.  Use the pool subsystem for structures small enough that
  this is feasible.  This also obsoletes LFS_THROTTLE.

And a few that are not strictly necessary:

* Moves the LFS inode extensions off onto a separately allocated
  structure; getting closer to LFS as an LKM.  "Welcome to 1.6O."

* Unified GOP_ALLOC between FFS and LFS.

* Update LFS copyright headers to correct values.

* Actually cast to unsigned in lfs_shellsort, like the comment says.

* Keep track of which segments were empty before the previous
  checkpoint; any segments that pass two checkpoints both dirty and
  empty can be summarily cleaned.  Do this.  Right now lfs_segclean
  still works, but this should be turned into an effectless
  compatibility syscall.
2003-02-17 23:48:08 +00:00
perseant 6b857c229e Add ipf packet-filtering option to if_bridge. The option is controlled at
compile-time by BRIDGE_IPF, and at runtime by brconfig with the {ipf,-ipf}
option on a per-bridge basis.

As a side-effect, add PFIL_HOOKS processing to if_bridge.
2003-02-15 00:46:30 +00:00
grant c39c2e62d5 'NetBSD.org' and some mdoc fixes. 2003-02-14 16:21:47 +00:00
atatat 1784bd0a07 If no other name is specified, and machdep.booted_kernel is present
and names a file, use that as a the default kernel, otherwise fall
back to /netbsd.

Makes lkms work *much* better when you're testing kernels that are not
named /netbsd.
2003-02-09 23:29:32 +00:00
wiz 82ece76c41 Drop trailing space (in last). 2003-02-09 21:56:19 +00:00
perry d259c39de5 Slightly clarify/improve the documentation for the -B (boot selector)
option
2003-02-09 20:46:29 +00:00
enami 166444b3a9 No need to print same error message twice in the same line. 2003-02-06 23:25:02 +00:00
enami 8d849f483a Check lseek error correctly (i.e., use == -1 rather than < 0). 2003-02-06 23:00:08 +00:00
perry 8a49ec08e4 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-04 23:07:28 +00:00
enami c27806c8fd Fix typo I've introduced while cleaning up for commit. 2003-02-04 08:43:16 +00:00
enami 3053f5ec9b - Fix daddr_t print format inside ifdef DIAGNOSTIC.
- Start scan cache entry just filled, rather than starting from top.
2003-02-04 08:24:20 +00:00
enami c886a0529a Convert `nblksread' to in terms of device block size. This restores
originally intended behaviour (see tech-userlevel archive around 1999 March).
2003-02-04 08:11:50 +00:00
enami 799974edb6 Cosmetic changes. 2003-02-04 08:06:42 +00:00
hannken c089bab65b Merge "struct cheader" and "struct cdesc" into an union.
No more alignment problems if the alignment of these two differs.

Approved by: Manuel Bouyer <bouyer@netbsd.org>
2003-02-03 23:08:37 +00:00
kleink 71d7654509 Add sysconf(3) knobs for recent additions. 2003-02-02 20:33:05 +00:00
kleink b971350427 Add several missing items, and be less rageous about memory locking. 2003-02-01 00:42:03 +00:00
thomas 5d2b072ae0 Define Atari keyboard type. 2003-01-31 23:32:21 +00:00
mrg cf9ff87a3a make this build on alpha after daddr_t->64bit 2003-01-28 05:17:12 +00:00
fvdl a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
hubertf 8221d7ffdd Mention that the mount point for a remote swap file must exist as a directory.
Sanity checked by salo.
2003-01-24 19:48:52 +00:00
dsl 2ac00e9169 display machdep.diskinfo for i386 and x86_84
(agreed by christos)
2003-01-22 17:12:41 +00:00
atatat dd0a8acd21 The next release will be 2.0, not 1.7. 2003-01-19 21:25:36 +00:00
tsutsui b33c28a7f5 libutil (which was added for MNT_GETARGS) is no longer needed. 2003-01-19 12:37:41 +00:00
jdolecek f9e0089642 fix typo on mount_ext2fs line 2003-01-19 10:52:25 +00:00
jdolecek 4a97217e59 do not link all mount programs into single image; the total size difference
isn't really that huge now that these are compiled as dynamic
2003-01-19 10:49:11 +00:00
kleink b3df6303a9 Rename `sigset' locals to avoid symbol shadowing warning. 2003-01-16 09:38:37 +00:00
jmmv dd4a382f46 Print missing newline in two bootselector-related messages. Approved by wiz. 2003-01-10 23:37:34 +00:00
wiz 1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
wiz 821c09da13 Bump date for revert. Use proper mdoc in some places. Avoid \fI and \fP.
Begin new sentences on new lines.
2003-01-06 11:37:19 +00:00
seb d7b1a9a6a6 Introduce a new feature for reverting multiple boot configurations i.e.
effectively making the currently selected configuration the only one
active and removing boot configuration selection menu.
This is accomplished by running 'newbtconf revert'.

From PR bin/17808 by myself. Thanks to gendalia and lukem for the help finding
the right keyword.

Approved by lukem.
2003-01-06 00:31:49 +00:00
seb 7c96b4b4d4 Newbtconf is supposed to handle directories as well, like /etc/rc.conf.d,
hence fix directory handling.
From PR bin/17807 by myself. Approved by lukem.
2003-01-05 23:32:54 +00:00
kristerw 84b199e7d9 Correct length of a memcpy.
From Alan Barrett in PR 18620.
2003-01-05 22:28:41 +00:00
wiz 617b132aac Spell output with two ts. 2003-01-04 23:43:02 +00:00
wiz 2208fe9813 Sort sections. 2003-01-02 10:32:01 +00:00
jschauma b49ef594e9 Fix tyops pointed out by Igor Sobrado in PR misc/19623:
mount_filecore(8) - frquently (frequently), upto (up to)
mount_nfs(8)      - NFSV3 (NFSv3), automaticly (automatically)
mount_ntfs(8)     - particularily (particularly), fisk (disk)
2003-01-01 21:22:50 +00:00
manu 41bfbd28fe On Darwin, mach_init is the system bootstrap process. It is responsible
for forking the traditional UNIX init(8) and it does the Mach port naming
service. We need mach_init for the naming service, but unfortunately, it
will only act as such if its PID is 1. We introduce a sysctl
(emul.darwin.init_pid) to fool a given process into thinking its PID is 1.
That way we can get mach_init into behaving as the name server.

Typical use:
/sbin/sysctl -w emul.darwin.init_pid=$$ ; exec /emul/darwin/sbin/mach_init
2002-12-24 12:15:45 +00:00
wiz cbd9802b91 Remove traces of old names (verifiedexec_load and /dev/verifiedexec). 2002-12-21 23:41:44 +00:00
wiz a054d0cce5 Add a BUGS section describing that async mounts are currently disabled,
and explaining the reason. From Julio Merino.
2002-12-21 20:33:35 +00:00