summaryrefslogtreecommitdiff
path: root/usr.sbin/makefs
AgeCommit message (Collapse)Author
2019-02-03- add or adjust /* FALLTHROUGH */ where appropriatemrg
- add __unreachable() after functions that can return but won't in this case, and thus can't be marked __dead easily
2018-09-03Rename min/max -> uimin/uimax for better honesty.riastradh
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended. HOWEVER! Some subsystems have #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation. To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it. I have left a handful of bootloaders that are too annoying to compile-test, and some dead code: cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4)) It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them. Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
2018-03-28Correctly mark the last El Torito section header.nonaka
Pointed out by Benno Rice via DM.
2018-01-27Need strings.h for ffs()sevan
2017-12-16PR/52828: Mark Johnston: makefs UFS2 lazy inode initialization is buggychristos
makefs(8) emulates UFS2 in performing lazy initialization of inode blocks when allocating and writing inodes. However, it only ever initializes one inode block at a time, which may be insufficient. If so, a later initialization may clobber an inode, resulting in an inconsistent filesystem. I committed a minimal fix for the problem to FreeBSD: https://svnweb.freebsd.org/changeset/base/326912
2017-11-09Initialize boot_catalog_entry's entry_type properly.nonaka
This had been missing but the type was used in cd9660_setup_boot(). From OpenBSD usr.sbin/makefs/cd9660/cd9660_eltorito.c r1.10.
2017-04-14leave the size alone and set the create_size to include the offset. Itchristos
does not matter anyway, but it makes more sense this way.
2017-04-14Whitespace fixes.wiz
2017-04-13Explain the 's' image size better.christos
2017-04-13for consistency with ffs, don't count the offset into the size.christos
2017-04-13Fix error handling; msdosfs_wfile is supposed to return errno.christos
2017-03-15Change duplicate 'D' option to 'm'. From Ed Maste @ FreeBSDchristos
2017-02-16allow 0 timestampchristos
2017-02-16need <sys/stat.h>christos
2017-02-16fix msdos reproducible builds!christos
2017-02-16start fixing msdosfs for reproducible builds; does not work yet.christos
2017-02-12file system police.wiz
2017-02-11untorture language.christos
2017-02-11mention timezone change for -T timestampchristos
2017-02-09Revert the part of mkfs.c 1.36 that "gutted the const" (whilekre
retaining the part that added a different one). That is, re-constipate makefs (well, just a bit, no real pain here.)
2017-02-08If we are using a timestamp from the command line, don't pay attention tochristos
the user timezone, use UTC instead (for reproducible builds).
2017-02-08stampst.st_ion consistent treatment (non-zero vs zero instead of testing == 1)christos
2017-02-08gut const for now.christos
2017-02-08Don't store random (from ASLR) pointers into the superblock. Should be thechristos
last (famous last words) problem with reproducible builds!
2017-02-08no, this is wrong.christos
2017-02-08zero out the superblock so that it does not contain random stuff in thechristos
spare fields.
2017-01-24makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.nonaka
2017-01-11Document msdos-specific options directly.wiz
From jmc@OpenBSD. Bump date.
2017-01-11Some changes and sorting based on diff sent from jmc@OpenBSD.wiz
2017-01-11Disable a couple of warnings until further investigation.joerg
2017-01-10Include missing header <unistd.h> for write(2) read(2) close(2)kamil
These functions are undefined after switch to new zlib.
2016-11-25PR/51652: Sevan Janiyan: makefs dies due to segmentation faultchristos
Don't dereference NULL when running out of nodes during rename.
2016-06-24tidy up error messageschristos
2016-03-07PR/50911: David Binderman: Optimize memsetchristos
2016-02-06Split case folding table into separate source file and add fullmlelstv
copyright and permission notice from http://www.unicode.org/copyright.html
2016-01-30Add support to msdosfs and makefs to generate correct Unicode (UCS-2) directorymlelstv
entries from UTF8 encoded file names.
2015-12-24little size_t/ssize_t...christos
2015-12-21Fix some more MKREPRO issues in cdrom creation. Now amd64 passes MKREPRO.christos
2015-12-21more deterministic ffs for reproducible builds.christos
2015-12-20Add timestamp support to the ffs image creation; needed for in kernel memorychristos
images MKREPRO.
2015-11-27Don't pass garbage to parsedate, but do use the return value.joerg
2015-11-25Sort options in usage to match man page order.wiz
2015-11-25"file system" as two words.wiz
2015-11-25Provide a -T option to set timestamps to a consistent value for MKREPROchristos
2015-10-16remove clause 3.christos
2015-06-17more error normalizationchristos
2015-06-16improve error messages (remove \n, use __func__, etc)christos
2015-03-29Make the userland signature and uses of bread() match the kernel ones,agc
after the removal of the cred argument.
2015-01-12reflect reality about filesystems supported.christos
2015-01-12PR/49559: Christian Brueffer: Fix typo maxbpf instead of maxbpg.christos