Commit Graph

38 Commits

Author SHA1 Message Date
bouyer bacd71f681 Check the number of cylinder group summary area against MAXCSBUFS. fsck and
the kernel will happilly trash data after fs_csp[] in the superblock with
a large number of cylinder group.
2000-05-22 10:33:45 +00:00
wrstuden 398c91fa04 Adjust column-sizing code to keep output in 76 character lines, so output
doesn't wrap in sysinst.
1999-07-30 17:44:01 +00:00
wrstuden 6735cc1a4c Make newfs's spare superblock output nicer. Figure out how wide the
largest block number will be, and make the columns wide enough for it. Then
make enough columns to fit in an 80 character window.

Samples: small end & faked up values:

super-block backups (for fsck -b #) at:
   32,  176,  272,  416,  512,  656,  752,  896,  992, 1136, 1232, 1376, 1472,
 1616, 1712, 1856, 1952, 2096, 2192, 2336, 2432, 2576, 2672, 2816, 2912, 3056,
 3152, 3296, 3392, 3536, 3632, 3776, 3872, 4016, 4112, 4256, 4352, 4496, 4592,

For a 155 GB fs we have:

super-block backups (for fsck -b #) at:
       128,     65792,    131456,    197120,    262784,    328448,    394112,
    459776,    525440,    591104,    656768,    722432,    788096,    853760,
    919424,    985088,   1050752,   1116416,   1182080,   1247744,   1313408,
   1379072,   1444736,   1510400,   1576064,   1641728,   1707392,   1773056,
...
 317462144, 317527808, 317593472, 317659136, 317724800, 317790464, 317856128,
 317921792, 317987456, 318053120, 318118784, 318184448, 318250112, 318315776,
 318381440, 318447104, 318512768, 318578432,

Now it actually looks like someone's thought about making large fs's. :-)
1999-05-14 22:36:50 +00:00
wrstuden f2c170eda0 Modify newfs so that the root node (and lost+found dir, if created)
of the new fs has uid.gid equal to the euid.egid of the process
which made it. This change permits users who have write access to
a device (say a floppy) to create a filesystem that, when mounted,
they have write access to.

This change closes PR bin/5990 from jbernard@ox.mines.edu, and is also the
change requested in PR bin/6276 from "Charles M. Hannum" <mycroft@netbsd.org>
1999-03-16 21:52:34 +00:00
wrstuden 988bdf8e19 Modify how the byteswapping of the cylinder summaries is handled. If we
need to swap, allocate a buffer for the swapped summaries rather than using
writebuf. The latter is fixed at 64k, which is only enough room to hold
4096 summaries. Creating an fs with more results in a buffer overrun.

First noted by Matt Jacob mjacob@netbsd.org, and fixed by Albeaus
Bayucan, bayucan@nas.nasa.gov. Minor mods by me.
1999-03-11 20:23:58 +00:00
simonb 00c4adc933 Explicitly zero "node" before we start using it. 1998-11-03 18:14:55 +00:00
thorpej a2d370bc46 Use DINODE_SIZE instead of sizeof(struct dinode). Also, eliminate some
unnecessary pointer casts.
1998-10-23 00:39:15 +00:00
kleink 31e5ddfa12 Need <time.h> for time() prototype. 1998-04-01 15:28:12 +00:00
bouyer 15c41b2f72 Allow creation of non-native byteorder FFS (via the '-B' option). 1998-03-18 17:10:15 +00:00
drochner 55f4357866 Make "mount_mfs" behave synchronously - don't exit before the mount is
done. This has 2 advantages:
-The calling process can rely on the mounted filesystem.
-We get error messages if the mount system call fails.
1997-11-01 18:25:46 +00:00
jeremy f83ae6979b Quell gcc 2.7.2 initialization warning. 1997-09-21 08:32:04 +00:00
lukem ec31f79470 * resolve conflicts from lite-2 import
* use int32_t instead of long
1997-09-16 14:05:39 +00:00
christos bec3b005c5 Fix compiler warnings. 1997-06-30 22:20:30 +00:00
cgd 93a2f4ea60 update for posixified stat structure 1995-06-18 21:35:33 +00:00
mycroft ae16273156 Back out previous change. 1995-06-11 05:16:04 +00:00
cgd 788733b7a9 typeof(timeval.tv_sec) != time_t 1995-06-07 17:14:21 +00:00
jtc 2d709c7062 flush stdout instead of stderr, so that each block number is displayed
as it is printed.  From PR 989.
1995-05-06 06:55:34 +00:00
mycroft 5a76ea02ce Set the `clean' flag. 1995-04-12 21:24:31 +00:00
cgd 0cc5c1886a short -> int16_t in a couple of places 1995-03-21 01:28:05 +00:00
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
cgd 909eb54fbb calculate the 'offset' argument to lseek() in a prettier way, more
consistent with the way fsck(8) does it.  no functional change.
1995-03-18 07:02:29 +00:00
cgd f9b9202a22 flush stdout after printing each alternate superblock location. 1995-03-04 06:28:20 +00:00
cgd 4c02b41140 fix up inconsisten uses of lseek(). (three uses. one hard-coded 'whence'
as a number, one used an L_ constant and the other used a SEEK_ constant!)
1995-03-04 06:10:39 +00:00
cgd 74104b5039 compile against new headers. 1994-12-18 16:00:21 +00:00
cgd 4c998ed311 type size paranoia, and allow one to mount an mfs on the device 'swap',
so that diskless machines can use MFS /tmp directories.
1994-12-18 05:09:39 +00:00
cgd 86400f0f91 types/field names. 1994-10-31 04:22:12 +00:00
mycroft ea7b5d4ec6 Eliminate uses of some obsolete functions. 1994-09-23 14:26:58 +00:00
cgd 040aaa7707 fix from Peter Galbavy <peter@alice.wonderland.org>: don't overflow 80cols. 1994-07-20 20:31:58 +00:00
cgd cbc266d592 fix that annoying 'cgd0: bad magic number' bug 1994-07-20 20:06:52 +00:00
mycroft 625a6892f7 Update from 4.4-Lite, with local changes. 1994-06-08 19:27:32 +00:00
cgd ceeb9f072d various grunge 1994-04-25 18:28:36 +00:00
cgd 59e72907cf off_t death... 1994-04-01 08:42:43 +00:00
mycroft d9e1211542 Set clean flags. 1993-10-01 01:56:42 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd cbdb50c1c1 incorporate changes from 0-9-base to 0-9-ALPHA 1993-07-28 00:56:43 +00:00
cgd 06be60083d changed "Id" to "Header" for rcsids 1993-03-23 00:22:59 +00:00
cgd 346aa5dd48 added rcs ids to all files 1993-03-22 08:04:00 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00