Commit Graph

15 Commits

Author SHA1 Message Date
briggs 755a56f62f Protect use of __RCSID() with a check to ensure that it's defined.
Suggested by Ian Lance Taylor on tech-userlevel@ to help cross-compilation
on Red Hat 7.3.
2003-04-16 01:32:07 +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
mrg ab09fc008e make this build on alpha after daddr_t->64bit 2003-01-28 08:22:08 +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
soren 236006d5dc Remove extraneous \n's in {err,warn}{,x} that used to be printfs. 2002-08-08 13:24:12 +00:00
lukem 02647fd20d don't need <ufs/ufs/dir.h> here 2002-02-06 14:58:15 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
lukem aa99e59f3d - crank default cpg from 16 to 65536, and let the auto-sizing code in
mkfs() do its job
- pass cpgflg=1 to mkfs() if the user provided cpg, =0 otherwise
- improve error reporting in ffs_write_file()
- only add superblock & block map slop for one cylinder group.
  trying to calculate the number of required cylinder groups caused
  too many problems when tweaking parameters for small file systems.
  rely upon slop from minfree, and upon ffs_write_file() to complain
  if the user is too aggressive about tweaking the parameters
2002-01-26 13:22:16 +00:00
lukem be917c6b28 apply changes from revs 1.56-1.59 of newfs/mkfs.c:
* revision 1.56
	the change of calculation of inodes per group in rev 1.52 was far too
	aggressive; rework to be a bit less susceptable to round-off error.
	now it's likely that the density might not be obtained with a small
	filesystem with a large number of inodes (e.g -s 4M -i 1k), but that's
	an extremely unlikely corner case that can easily be rectified with
	command-line arguments.
	fixed provided in private email by Takao Shinohara <shin@sm.sony.co.jp>
	should resolve PRs [bin/14049] and [bin/14046]
    [ this fixes a problem in makefs(8) that matt green reported ]

* revision 1.58
	clamp bsize to MAXBSIZE

* revision 1.59
	don't bother printing a warning about the cylinder group size being
	restricted if -c isn't given; it just confuses a user of newfs (and
	the cpg info is printed as part of the display anyway), and prints an
	unnecessary warning for mount_mfs.

XXX: I must rework newfs/mkfs.c to make it easier to just .PATH into makefs(8)
2002-01-18 08:32:34 +00:00
lukem 3d76579746 need ufs/ufs/dinode.h for ufs/ffs/fs.h 2002-01-08 06:00:14 +00:00
lukem 944794a509 add "ffs/ufs_inode.h" with a minimal struct inode, to replace
<ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need
and it #include's way more stuff in <sys/*> (etc) than is needed here.
yet another nail in the "let's make makefs a proper host tool" coffin.
2002-01-07 16:56:26 +00:00
lukem 557afc6071 - pull in <ufs/ufs/dinode.h> before <ufs/ffs/fs.h>
- #include <ufs/[uf]fs/*.h> instead of "ufs/[uf]fs/*.h", and don't bother
  with -I../../sys; we'll solve the hostprog problem another way and
  unconditionally pulling in NetBSD-current's usr/src/sys on a host system
  could be a Bad Thing.
2002-01-07 16:27:22 +00:00
lukem d74b2fc0ea fix bugs reported by matt green:
- when calculating file size, round up to frag size not block size
- #define FFS_EI in makefs.h, and include that before [uf]fs/*.h

other stuff:
- round up final size to next block (instead of next sector)
- protect makefs.h from multiple inclusion
2002-01-07 05:07:50 +00:00
lukem b7eb0e9a18 reference the ufs/[uf]fs headers in ../../sys rather than using those
in /usr/include. this should make it easier to make this a host tool
2001-11-22 02:47:25 +00:00
lukem 6325773eff makefs - create a file system image from a directory tree.
It doesn't need any special privileges or kernel devices.

Only ffs image creation is supported at this time, although makefs has been
designed to allow the addition of other file system formats by writing new
back-ends.

This program was designed & implemented by Luke Mewburn of Wasabi Systems.
2001-10-26 06:16:19 +00:00