Commit Graph

18 Commits

Author SHA1 Message Date
lukem 5f26fac683 use (size / DEV_BSIZE) instead of btodb(size). fixes cross build issue. 2002-02-06 15:36:30 +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
tv 76834aef57 Protect __RCSID and __COPYRIGHT from being invoked if not defined. 2002-01-31 19:36:47 +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 d860e86b14 don't need ffs/buf.h here 2002-01-18 08:20:32 +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
thorpej 1b1d20a895 Need <strings.h> for ffs() prototype (noticed by gcc 3.1). 2001-12-31 19:45:03 +00:00
thorpej aa38e62655 Need <stdlib.h> for abort() prototype (noticed by gcc 3.1). 2001-12-31 19:44:27 +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 68b8babd26 sync with ufs/ufs/ufs_bmap.c rev 1.14:
- assert that ufs_getlbns() is only called for blocks which involve indirects
- use a shift instead of a multiply in one place
2001-11-08 06:10:13 +00:00
lukem 1226af2bc4 tweak copyright 2001-11-02 03:12:48 +00:00
lukem cafb53fc3d add __RCSID() 2001-10-28 13:14:05 +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