Commit Graph

219 Commits

Author SHA1 Message Date
sjg 07f6254fe3 Add -Z to enable sparse files - for ffs at least.
Based on a patch from shesha at juniper.
2012-06-22 06:15:18 +00:00
joerg 17770eb834 usage is dead. name_len should be read as unsigned byte. 2012-04-29 13:32:21 +00:00
dogcow d5de483ef7 As this code is used by tools, and thus needs to be portable,
eliminate all the mucking around for an undocumented, seemingly
unused field and use 0.
2012-04-27 20:58:54 +00:00
adam a92b391e5e Fix building tools 2012-04-20 13:28:27 +00:00
dholland 0a7a01f2e2 Fix build failure reported by bracket.
(shouldn't this size_t be ino_t?)
2012-04-19 19:48:14 +00:00
christos b825b96b8e WARNS=5 2012-04-19 17:28:25 +00:00
christos ad1d2050fc - fix compilation isses
- add some error checking
- avoid alloca
- add missing frees
2012-04-19 17:09:53 +00:00
wiz 78496082c1 New sentence, new line. 2012-04-19 16:00:25 +00:00
ttoth 0751a667c7 added chfs support for makefs 2012-04-19 15:36:06 +00:00
christos bac18f3659 Pull FreeBSD fix from Andreas Tobbler:
- Write the ISO9660 descriptor after the apm partition entries.
- Fill the needed pmPartStatus flags. At least the OpenBIOS
  implementation relies on these flags.

This commit fixes the panic seen on OS-X when inserting a FreeBSD/ppc disc.
Additionally OpenBIOS recognizes the partition where the boot code is located.
This lets us load a FreeBSD/ppc PowerMac kernel inside qemu.
2012-04-02 19:01:21 +00:00
christos f1cc09510d Patch from Jung-uk Kim (jkim at FreeBSD dot org) to allow contents of multiple
directories to be merged to the current image.
2012-01-28 02:35:46 +00:00
christos 4a5d314575 add support for setting the ufs label. (Nathan Whitehorn) 2011-10-09 21:33:43 +00:00
christos 91cc0e5629 more fixes from martin 2011-08-23 19:57:24 +00:00
christos 3e74546ba5 remove stray brace, minor knf 2011-08-23 19:17:07 +00:00
christos 1beaa2ceec PR/45285: Martin Matuska: makefs does not properly convert ISO level 1 and 2
filenames (buffer overflow)

makefs does not properly verify the maximum filename length in the
special "." case for both ISO level 1 and ISO level 2 filename
conversion.  This creates broken images or causes a buffer overflow
(ISO level 2).

ISO level 1:
If a filename contains only dots or up to 8 characters followed by
dots the 8+3 limit check doesn't work.

ISO level 2:
If a filename contains a dot in the first 30 characters and a dot
on the 30th character, the length limit check doesn't work and the
buffer is overflowed.

$ mkdir level1
$ touch level1/12345............
$ makefs -t cd9660 -o isolevel=1 test.iso level1

$ mkdir level2
$ touch level2/1234567890.2345678901234567.....34567890123456789012345
$ makefs -t cd9660 -o isolevel=2 test.iso level2
2011-08-23 17:09:11 +00:00
wiz 8e6d328065 Re-order `usage' alphabetically;
rename option arguments in the manpage's `SYNOPSIS' section to
match those from `usage' (not the other way around; the `usage'-line
(and other parts of makefs.c) contain the correct names);
minor punctuation improvements.

From Snader_LB.
2011-08-15 14:45:01 +00:00
uch 7d18226237 newfs_v7fs(8)'s -v and -P options are obsolete. changed to newfs(8) compatible -V option. 2011-08-10 11:31:49 +00:00
christos b166834bb8 PR/45217: Martin Matuska: Use proper lengths to space pad fields and don't
overwrite them according to the spec.
2011-08-06 23:25:19 +00:00
wiz fc4d0f871a Bump date for previous, fix typo. 2011-07-22 13:04:00 +00:00
joerg 29d01baadc Allow cross-compiling from Linux 2011-07-19 18:29:41 +00:00
tron 12aec09384 Re-enable v7fs support in the tools version of "makefs" after the
issues have been fixed by Alan Barrett. Tested under Mac OS X.
2011-07-18 22:52:37 +00:00
tron d341b47a1c Define "USE_V7FS" in the makefile of the directory with the actual source. 2011-07-18 21:22:55 +00:00
tron 043cc21d99 Don't include v7fs support into tool version of "makefs" because it
breaks the build.
2011-07-18 17:15:51 +00:00
tron 2c0999f3fa Fix broken error check found by GCC 4.5. 2011-07-18 17:15:07 +00:00
tron b166bb160f Don't include v7fs support into tool version of makefs because it
breaks the build.
2011-07-18 17:15:06 +00:00
uch dd9e830956 v7fs(7th edition(V7) file system) support. 2011-07-18 08:58:38 +00:00
enami 0b23c5aa3d Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h
since actual user is not cd9660_eltorito.c but iso.h and
cd9660_eltorito.h.

Actually, include order/place of sys/endian.h doesn't matter on
netbsd since it is always included by sys/types.h but it's not
true on other system.  This should fix cross build breakage on
freebsd introduced by rev. 1.16 of cd9660_eltorito.c.
Problem reported and fix suggested on twitter.
2011-06-23 02:35:56 +00:00
mrg 75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
tsutsui 79fcae9efc Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
corrupted cd9660fs):
 - makefs/cd9660.c:
  - cd9660_rrip_move_directory() should also update lenght[0] and
    name_len[0] in dir->isoDirRecord
 - makefs/cd9660/iso9660_rrip.c:
  - cd9660_rrip_finalize_node() should check rr_real_parent in node->parent,
    not in node itself in RRIP_PL case
  - cd9660_rrip_initialize_node() should update only node passed as arg
    so handle RRIP_PL in DOTDOT case

Fixes malformed dotdot entries in deep (more than 8 level) directories
moved into .rr_moved dir.

Should be pulled up to netbsd-5.
(no official ISO has such deep dirs, but cobalt restorecd is affected)
2011-05-29 17:07:57 +00:00
tsutsui 72050b117c - remove unnecessary (pasto?) line on RRIP PL handling for moved dir
- RRIP RE length should be 4, not 0
2011-05-28 11:59:29 +00:00
christos c419ca3c2c include system headers after config.h 2011-05-23 00:21:50 +00:00
christos 0477909eb4 From Nathan Whitehorn (nwhitehorn at freebsd dot org):
Add code to generate bootable ISOs on Powermac and CHRP systems.
Synthesize some partition maps (APM and MBR, respectively) pointing
to (a) the whole disk, and (b) relevant El Torito boot images that
have been added by other code. These partition maps are a little
bit funny looking, but they seem to work. FreeBSD has been using
this successfully in their release generation on powerpc, as well
as generating all non-SPARC install media. SPARC support could
probably be added as an extension of this patch.
2011-05-22 21:51:39 +00:00
christos 8bd84b0401 Fix typos in character ranges from: Baptiste Daroussin bapt at freebsd dot org 2011-03-23 13:11:51 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
wiz 613c28210d Fix fd leaks in error cases. Found by cppcheck. 2011-01-04 09:48:21 +00:00
tsutsui 41610f52e9 cd9960 -> cd9660 2010-11-19 15:47:32 +00:00
christos 2ec6e0f18a Handle > 2GB images. Thanks to Greg Troxel for testing! 2010-10-27 18:51:34 +00:00
christos 203850f0b2 - simple fseek->fseeko conversion. probably needs more work.
- use a constant instead of sprinkling 2048 everywhere.
2010-10-22 00:49:15 +00:00
mbalmer f0a888ee5f make sense 2009-11-22 18:43:27 +00:00
mbalmer 124961627e s/the the/the/ 2009-11-22 18:40:26 +00:00
snj 550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
ahoka 39c5e1f59f Get rid of the DOS line endings in the file.
No change of the code intended.
2009-07-04 14:31:38 +00:00
joerg 70e3d67b70 Create images with 0666 - umask, not 0777 - umask (e.g. without x bits). 2009-04-28 22:49:26 +00:00
lukem d877c4c3c0 Enable WARNS=4 by default, except for:
cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
2009-04-22 15:23:01 +00:00
dyoung 7af558eba1 Distinguish read(2) failure due to a short read from other causes, and
suggest in the error message a possible cause: the size= attribute in
the metalog (if one is given) may be different from the source file's
actual size.
2009-04-16 18:54:16 +00:00
bjh21 9d5675794b Bump date for last change. 2009-01-20 20:47:25 +00:00
pooka aeac8f5107 Move fs-specific stuff in Makefile to fs/Makefile.inc to clarify
top-level Makefile.
2009-01-16 19:39:52 +00:00
pooka 9857fb8cb2 remove fsopts asserts - the parameter is unused, so we don't care here 2009-01-16 18:02:24 +00:00
bjh21 f8474b32a7 Add support for encoding RISC OS metadata into ISO 9660 filesystems.
This is done by adding the general ability to stuff non-SUSP data into
the end of the System Use field of a Directory Record, which required
some amount of rewriting of the SUSP support.  I think the result is
at least as good as what came before, and I've fixed at least one bug
along the way.  Tested against RISC OS 3.70 on my Risc PC.

Oh, why do we want it?  It should allow us to make acorn{26,32} CDs that
can be booted directly from RISC OS without mucking around copying the
bootloader to a native filing system.
2009-01-10 22:06:29 +00:00
he 8309b1bdfc Initialize a local variable to get rid of a "may be used uninitialized"
warning (turned into error by -Werror).
2009-01-10 11:04:36 +00:00