Commit Graph

178 Commits

Author SHA1 Message Date
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 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
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
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
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
itojun 8883e1fb40 use bounded string op 2003-07-13 08:05:58 +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
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
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
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
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
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
grant c39c2e62d5 'NetBSD.org' and some mdoc fixes. 2003-02-14 16:21:47 +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
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
scw 6054b38a2b Use getlabeloffset() instead of LABELOFFSET. 2002-12-12 11:40:17 +00:00
wiz 13338324bd Remove some unnecessary ``\&''. Add an 'n' between an 'a' and an 'A'. 2002-10-12 22:42:52 +00:00
wiz 2fb4b1db52 New sentence, new line. By Robert Elz with minimal fixes. 2002-10-01 13:40:23 +00:00
dbj 43395bd5a8 Add support for the Apple UFS variation on ffs
This is the bulk of PR #17345

The general approach is to use a run time deteriminable value
for DIRBLKSIZ.  Additional allowances are included for using
MAXSYMLINKLEN with FS_42INODEFMT and a shift in the cylinder group
cluster summary count array.  Support is added for managing
the Apple UFS volume label.
2002-09-28 20:11:05 +00:00
christos 9f9ee29713 MNT_GETARGS support 2002-09-21 18:43:31 +00:00
wiz 2ae3428010 Drop superfluous Ns. 2002-08-20 16:07:45 +00:00
lukem 7360d7b6ae Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path 2002-08-19 10:16:51 +00:00
soren 236006d5dc Remove extraneous \n's in {err,warn}{,x} that used to be printfs. 2002-08-08 13:24:12 +00:00
lukem e5aacbc0a7 Add examples. Inspired by [misc/16193] from
Brian A. Seklecki <lavalamp@hurt.spiritual-machines.org>
2002-05-21 11:25:38 +00:00
mycroft f127f0f067 Some manual strength reduction. 2002-04-10 17:28:13 +00:00
mycroft 3bc20d3480 Remove debugging output. 2002-04-10 08:27:54 +00:00
mycroft 9eab713623 Use fs_fragshift more. Simplify a bunch of arithmetic involving NSPF(). 2002-04-10 08:27:23 +00:00
dsainty be5810b4d6 Reverted a small part of 1.30, removing full stops that accidentally got added
in the middle of sentences.
2002-04-06 05:57:17 +00:00
lukem d45e6662b4 change the default back to checking the file system type is '4.2BSD',
and add -I to ignore this check.  per discussion with thorpej.
2002-02-20 04:04:39 +00:00
thorpej 044d35e196 * Undo rev 1.55. While one might think this test is useful, newfs
has historically allowed file systems to be created on non-4.2BSD
  partitions, and the ability to do so is quite useful to some people.
* When rewriting the disklabel, don't consider it an error if there's
  not a label already on the disk (and thus the rewrite operation fails).
2002-02-16 19:39:30 +00:00
ross dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
lukem 94243a4cd5 wrap some mfs specific code in #ifdef MFS 2002-01-18 08:59:18 +00:00
lukem 775d59e652 fix this if MFS is not #defined 2002-01-18 08:37:08 +00:00