| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The superblock structure has space reserved for a pointer to an
in-memory structure that gets created at mount time. makefs populates
it since that simplifies code elsewhere. However, the pointer value
ends up in the output file, which breaks reproducibility.
Zero the field when writing the superblock instead, as its on-disk value
is ignored.
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50196
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each program that operates on UFS on-disk inodes defines its own
version of a dinode. They all (of necessity) define the same
layout but use different names. This change adds a definition of
a dinode (a union of a UFS1 on-disk inode and a UFS2 on-disk inode)
as well as a dinodep (a union of a pointer to a UFS1 on-disk inode
and a pointer to a UFS2 on-disk inode) in sys/ufs/ufs/dinode.h.
It then deletes the definitions of dinode and dinodep in all the
programs that operate on them and instead uses these standard
definitions.
No functional change intended.
MFC-after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.
Sponsored by: Netflix
|
| |
|
|
| |
Fixes: 2a63c3be1582
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous change to CGSIZE had the unintended side-effect of allowing
newfs and makefs to create file systems that would fail validation when
examined by older commands and kernels, by allowing newfs/makefs to pack
slightly more blocks into a CG than those older binaries think is valid.
Fix this by having newfs/makefs artificially restrict the number of blocks
in a CG to the slightly smaller value that those older binaries will accept.
The validation code will continue to accept the slightly larger value
that the current newfs/makefs (before this change) could create.
Fixes: 0a6e34e950cd5889122a199c34519b67569be9cc
Reviewed by: mckusick
MFC after: 3 days
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cylinder group header structure ended with `u_int8_t cg_space[1]'
representing the beginning of the inode bitmap array. Some architectures
like the i386 rounded this up to a 4-byte boundry while other
architectures like the amd64 rounded it up to an 8-byte boundry.
Thus sizeof(struct cg) was four bytes bigger on an amd64 machine
than on an i386 machine. If a filesystem created on an i386 machine
was moved to an amd64 machine, the size of the cylinder group
calculated by the CGSIZE macro would appear to grow by four bytes.
Filesystems whose cylinder groups were exactly equal to the block
size on an i386 machine would appear to have a cylinder group that
was four bytes too big when moved to an amd64 machine. Note that
although the structure appears to be too big, it in fact is fine.
It is just the calaculation of its size that is in error.
The fix is to remove the cg_space element from the cylinder-group
structure so that the calculated size of the structure is the same
size on all architectures.
Reported by: Tijl Coosemans
Tested by: Tijl Coosemans and Peter Holm
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
This matches NetBSD and rationalizes makefs with the kernel API.
This reverts commit 370e009188ba90c3290b1479aa06ec98b66e140a.
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
Obtained from: NetBSD 0a62dad69f62, 0c4125e1a19f, cb6a5a3575fd
Differential Revision: https://reviews.freebsd.org/D39070
|
| |
|
|
|
|
|
| |
For diff reduction against NetBSD.
Obtained from: NetBSD 0c4125e1a19f
Sponsored by: The FreeBSD Foundation
|
| |
|
|
| |
Obtained from: NetBSD af7bc97830ac
|
| |
|
|
|
|
| |
Reviewed by: markj, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39430
|
| |
|
|
|
|
|
|
|
|
|
| |
If bread returns an error there is no bp to brelse. One of these
changes was taken from NetBSD commit 0a62dad69f62 ("This works well
enough to populate..."), the rest were found by looking for the same
pattern.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39069
|
| |
|
|
|
| |
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D37470
|
| |
|
|
| |
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
- s/concearned/concerned/
- s/quadradically/quadratically/
Obtained from: NetBSD
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shortlinks occupy the space of both di_db and di_ib when used. However,
everywhere that wants to read or write a shortlink takes a pointer do
di_db and promptly runs off the end of it into di_ib. This is fine on
most architectures, if a little dodgy. However, on CHERI, the compiler
can optionally restrict the bounds on pointers to subobjects to just
that subobject, in order to mitigate intra-object buffer overflows, and
this is enabled in CheriBSD's pure-capability kernels.
Instead, clean this up by inserting a union such that a new di_shortlink
can be added with the right size and element type, avoiding the need to
cast and allowing the use of the DIP macro to access the field. This
also mirrors how the ext2fs code implements extents support, with the
exact same structure other than having a uint32_t i_data[] instead of a
char di_shortlink[].
Reviewed by: mckusick, jhb
Differential Revision: https://reviews.freebsd.org/D33650
|
| |
|
|
|
|
|
|
|
|
|
| |
Apparently some large-file systems out there, such as my powerpc64le
Linux box, define daddr_t as a 32-bit type, which is sad and stymies
cross-building disk images. Cast daddr_t to off_t before doing
arithmetic that overflows.
Reviewed by: arichardson, jrtc27, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27458
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, makefs(8) has very few spare inodes in its output images,
which is fine for static filesystems, but not so great for VM images
where many more files will be added. Make makefs(8) use the same
default settings as newfs(8) when creating images with free space --
there isn't much point to leaving free space on the image if you
can't put files there. If no free space is requested, use current
behavior of a minimal number of available inodes.
Reviewed by: manu
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D29492
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sys/buf.h, sys/pipe.h, sys/fs/devfs/devfs*.h headers usable in
userspace, assuming that the consumer has an idea what it is for.
Unhide more material from sys/mount.h and sys/ufs/ufs/inode.h,
sys/ufs/ufs/ufsmount.h for consumption of userspace tools, with the
same caveat.
Remove unacceptable hack from usr.sbin/makefs which relied on sys/buf.h
being unusable in userspace, where it override struct buf with its own
definition. Instead, provide struct m_buf and struct m_vnode and adapt
code to use local variants.
Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D28679
|
| |
|
|
|
| |
Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D27175
|
| |
|
|
|
|
|
|
|
|
| |
needed since introduced in -r362358.
PR: 247425
Sponsored by: Netflix
Notes:
svn path=/head/; revision=362418
|
| |
|
|
|
|
|
|
|
|
|
| |
There is no need to duplicate this file when it can be trivially
shared (just exposing sections previously under #ifdef _KERNEL).
MFC with: r351273
Differential Revision: The FreeBSD Foundation
Notes:
svn path=/head/; revision=351346
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(The kernel uses caddr_t.)
Suggested by: cem
Reviewed by: cem
MFC with: r351273
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21348
Notes:
svn path=/head/; revision=351319
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Although the ffs (and later msdosfs) implementation in makefs is
independent of the one in kernel, it makes sense to keep differences to
a minimum in order to ease comparison and porting changes across.
Submitted by: Siva Mahadevan
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=336736
|
| |
|
|
| |
Notes:
svn path=/head/; revision=333664
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- cd9660 relies on an #include "iso.h" but does not build any .c files
out of source, so remove reach-over .PATH
- ffs does not rely on any sys/ headers, so remove -I from CFLAGS.
- ffs_tables from sys/ is used by ffs; move the SRCS entry from the top-
level Makefile to ffs' Makefile.inc.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=332844
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
No functional change intended.
Notes:
svn path=/head/; revision=326276
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Notes:
svn path=/head/; revision=326025
|
| |
|
|
| |
Notes:
svn path=/head/; revision=319521
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NetBSD revs:
ffs.c 1.60
makefs.8 1.44
makefs.c 1.48
makefs.h 1.33
ffs/buf.c 1.20
ffs/mkfs.c 1.27
Obtained from: NetBSD
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10780
Notes:
svn path=/head/; revision=318951
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it has nothing to do with ffs and will eventually be moved.
gc sectorsize.
This is a corrected version of r317744.
NetBSD versions:
ffs.c 1.58
ffs/buf.c 1.14 1.18
ffs/buf.h 1.8
Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10803
Notes:
svn path=/head/; revision=318902
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add the ffs option to enable soft-updates.
The option is only processed is ufs2 has been selected.
Reviewed by: emaste, bapt (earlier version), allanjude (earlier version)
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D10773
Notes:
svn path=/head/; revision=318452
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10650
Notes:
svn path=/head/; revision=318451
|
| |
|
|
|
|
|
|
|
|
| |
This also unbreaks the fstyp tests.
Reported by: Alastair Hogge <agh@fastmail.fm>, Jenkins
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=317967
|
| |
|
|
|
|
|
|
|
|
|
| |
- make functions and variables static where appropriate
- use const char * where appropriate
- remove unused variables
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=317746
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it has nothing to do with ffs and will eventually be moved.
gc sectorsize.
NetBSD versions:
ffs.c 1.58
ffs/buf.c 1.14 1.18
ffs/buf.h 1.8
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=317744
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The emalloc set of error-checking memory allocation routines were added
to libnetbsd in r316572. Use them in makefs to reduce differences with
NetBSD.
NetBSD revs:
cd9660.c 1.39
ffs.c 1.56
makefs.c 1.42
walk.c 1.27
cd9660/cd9660_archimedes.c 1.2
cd9660/cd9660_eltorito.c 1.20
cd9660/cd9660_write.c 1.16
cd9660/iso9660_rrip.c 1.12
ffs/buf.c 1.17
ffs/mkfs.c 1.26
Obtained from: NetBSD
Notes:
svn path=/head/; revision=316579
|
| |
|
|
|
|
|
|
|
|
| |
NetBSD revs:
ffs/buf.c 1.14
Obtained from: NetBSD
Notes:
svn path=/head/; revision=316545
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- remove \n
- use __func__
- err adds the error string itself
NetBSD revs:
cd9660.c 1.48 1.49
ffs/buf.c 1.21
ffs/mkfs.c 1.27
Obtained from: NetBSD
Notes:
svn path=/head/; revision=315321
|
| |
|
|
|
|
|
|
|
|
| |
NetBSD revisions:
ffs/buf.c 1.14
Obtained from: NetBSD
Notes:
svn path=/head/; revision=315317
|
| |
|
|
|
|
|
|
|
|
| |
NetBSD revisions:
mkfs.c 1.32
Obtained from: NetBSD
Notes:
svn path=/head/; revision=315271
|
| |
|
|
|
|
|
|
|
|
|
| |
ffs_bswap.c 1.34
ufs_bswap.h 1.34
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=314537
|
| |
|
|
|
|
|
|
|
| |
This reduces differences with NetBSD
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=314536
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_
Reviewed by: kib, mckusick
Obtained from: NetBSD
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9536
Notes:
svn path=/head/; revision=313780
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From NetBSD christos Sat Jan 26 00:19:39 2013 +0000
make the buffer functions look exactly like the kernel ones and add other
cruft to make the kernel files compile.
ffs.c 1.54
ffs/buf.c 1.13
ffs/buf.h 1.3
ffs/ffs_alloc.c 1.21
ffs/ffs_balloc.c 1.15
Reviewed by: marcel, ngie
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8404
Notes:
svn path=/head/; revision=313575
|