Commit Graph

24 Commits

Author SHA1 Message Date
christos 33cb72e1c9 fix for 64 bit time_t and dev_t. 2008-12-28 21:51:46 +00:00
dbj d0c4ff452b implement -x by pruning fsnodes tree before building filesystem rather
than by skipping nodes while building filesystem
2006-10-10 01:55:45 +00:00
dbj 0e392af953 add implementation of free_fsnodes() which unlinks a node
from the hierarchy and frees it and any of its children
use it to free memory before a normal exit, which helps diagnostics
2006-10-10 01:46:49 +00:00
dbj 2d7375cec3 free specfile structure once it has been applied 2006-10-10 01:41:14 +00:00
dbj 1ca1523d99 use new implementation of link_check which i
implemented for du.c revision 1.25 :

Use open address hashtable with multiplicative double hash probing
and exponential hashtable growth for tracking previously seen inodes.
This replaces the O(n^2) behavior of linkchk() with an implementation
that should be O(n*logn)
2006-10-10 01:39:10 +00:00
dyoung 9d2dd62a57 Stop duplicating the ISO9660 sources in sys/fs/cd9660/ for makefs(8). 2006-02-01 22:19:34 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
jmc b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
lukem 5e4b83e60b Use uint64_t instead of uint32_t to store a host inode when checking
for duplicate inodes, as Cygwin's stat(2) has a 64 bit st_ino.
Fix from Ian Lance Taylor in private email.
2004-05-31 22:24:51 +00:00
itojun e99b62a1d7 realloc pedant 2003-09-19 06:11:35 +00:00
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun 2ab2b66ee8 just for safety - use sizeof 2003-05-09 00:48:59 +00:00
thorpej 1bcb9d76fb Add a -x option which causes makefs(8) to exclude any file system node
not explicitly listed in the specfile.
2003-03-29 00:12:12 +00:00
uwe 85b406eda9 s/ulong/unsigned long/. ulong is for SysV compatibility, there's no
point in using it in our code.  This change makes makefs(8) compile on
host systems without ulong.
2003-01-27 01:34:09 +00:00
provos 32b88027c7 use readlink with bufsize - 1; approved thorpej. 2002-10-19 20:33:17 +00:00
lukem 2afe4e83de If an entry is in the specfile but not in the underlying file system, and it's
marked "optional", don't add it. (e.g, don't create a zero-length file).
2002-02-08 01:17:32 +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 5647b7df77 Merge create_fsinode() into create_fsnode(), so that a newly created
fsnode always has a valid inode member.   Problem noted by Artem Belevich.
2002-01-23 02:26:21 +00:00
lukem ebbf3dddb5 rework `fsnode' into two components; `fsnode' contains the name and tree
information and a link to the appropriate fsinode, and `fsinode' contains
the inode information and a reference count. multiple fsnodes may point
to the same fsinode.  this replaces the 'dup' pointer in the previous code.
2001-12-05 11:08:53 +00:00
lukem 1226af2bc4 tweak copyright 2001-11-02 03:12:48 +00:00
lukem ae963680ea cast time_t values to long if printing as %ld to appease the sparc64 port 2001-10-29 07:30:07 +00:00
lukem d1270f6de8 - apply_specdir(): when adding a new symlink from the specfile, do the assert
check on the correct node
- apply_specentry(): if this node is a duplicate of another, apply the
  changes to the `master' entry instead of this one.
- fix inotype() to DTRT
- comment out some debugging info that is too verbose
2001-10-29 05:38:09 +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