Commit Graph

273 Commits

Author SHA1 Message Date
mrg 4008e3978a fix always true conditional by removing the address-of operator.
found by GCC 12.
2023-08-07 23:26:40 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
lukem f937c412f3 bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER
Provide a single variable
	CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
	CLANG_NO_ADDR_OF_PACKED_MEMBER
	CC_NO_ADDR_OF_PACKED_MEMBER
	GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 08:52:53 +00:00
chs 87ba0e2a31 Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new	fsck_ffs operations "-c	ea" and	"-c no-ea" to convert file systems
from UFS2 to UFS2ea and	vice-versa (both of which delete all existing extended
attributes in the process).
2022-11-17 06:40:38 +00:00
mlelstv a0e4d6d3d7 Silently ignore fstab entries with NAME= entries that cannot be resolved.
Fixes PR 56249.
2022-03-14 18:38:11 +00:00
christos 873fd60810 PR/56643: Paul Goyette: Disable the last block adjustment for now. It seems
to break restore.
2022-01-26 20:22:14 +00:00
christos d66b04778c PR/56270: Matthias Scheler: dump fails on ffsv1: Zero c_extsize since ffsv1
does not support extended attributes.
2021-07-07 11:06:37 +00:00
christos e2325e1f91 Add external attribute dumping and restoring support from FreeBSD.
Does not fully work yet, attributes are being saved and restored correctly,
but don't appear in the restored files somehow.
2021-06-19 13:56:34 +00:00
hannken 67464f77e0 Bitmaps (TS_BITS and TS_CLRI) dont use the "c_addr" array as they
cannot have holes.  As bitmaps are written without TS_ADDR records
"c_count" may be larger than the "c_addr" size resulting in a
segmentation violation reading "c_addr" beyond its end.

Compute "blks" for TS_INODE and TS_ADDR only -- its used for multi
volume dumps and the bitmaps must both be on the first volume.
2021-06-07 14:07:32 +00:00
kre b2fc8900ac PR bin/55834
count blocks written in unsigned 64 bit counter
rather than signed int which overflows after 2^31-1
blocks (2TiB) after which neither the 5 minute
status updates or SIGINFO (^T) reports are issued
until the negative numbers increase past 0 and
wildly inaccurate reports would be written.
2020-12-03 08:25:57 +00:00
mrg cb93b81028 add support for new GCC 9 warnings that may be too much to fix
right now.  new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree.  mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it.  (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.)  clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
2020-09-06 07:20:26 +00:00
joerg 6ce4f404a1 Fix depenency on common symbols in sbin. 2020-04-05 15:25:39 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
perseant 7aae290207 Add -D flag to allow the user to specify an alternate dumpdates file.
Closes PR #54469.
2019-08-19 18:12:50 +00:00
wiz d774658d68 Bump date for previous. 2019-03-25 07:03:17 +00:00
manu eeb96f8c80 Add -U flag to dump(8) and dump_lfs(8) to specify dumpdates entry
This address situations where dump(8) cannot figure out the device being
dumped. It also allows tracking of subvolume dumps by using virtual
device as dumpdates entry.
2019-03-25 02:13:01 +00:00
christos c8d11eb8cc Use getfsspecname() to fill the filesystem argument in dumpdates.
While here, make sure that the error strings terminate with newline
consistently, and add a function that adds the system error string.
2019-03-01 16:42:11 +00:00
mrg 272df19f70 - mark Exit() __dead
- bump a buffer size to avoid possible truncation
- adding missing fallthru comment
2019-02-03 12:17:14 +00:00
dholland c0640bfe41 Document what rdump is (was once) for. PR 53442. 2018-07-15 06:14:13 +00:00
sevan 06495a3a2e dump was there from v4.
Confirmed from the TUHS hosted copies of man pages.
Bump date.
2016-08-15 00:03:14 +00:00
christos d59d77037c - update NAME_MAX to match the kernel.
- add a comment about where the constant is used.
2015-11-16 17:06:47 +00:00
bouyer 2266c911f6 Consistently use iswap64() and 64bit intermediate variable, as well as
64bit formats for c_tapea. Fixes tape useage report for large filesystems.
2015-08-24 17:37:10 +00:00
bouyer 262ce6cb8d Default the read block size (-k default value) to kern.maxphys (usually
64k these days). This gives a noticable performance boost on large filesystems.
2015-08-24 17:34:03 +00:00
dholland b1828e0ba3 Hack up dinode usage to be 64 vs. 32 as needed. Part 1.
(This part changes the native lfs code; the ufs-derived code already
has 64 vs. 32 logic, but as aspects of it are unsafe, and don't
entirely interoperate cleanly with the lfs 64/32 stuff, pass 2 will be
rehashing that.)
2015-08-12 18:28:00 +00:00
dholland 34f0d74c9e Add a new lfs header file: lfs_accessors.h.
This contains all the accessor functions and macros out of lfs.h.
Add an include of lfs_accessors.h after all uses of lfs.h... except
for code that wants to define its own struct lfs-alike that the
accessors are supposed to play along with. For these, set STRUCT_LFS
and include lfs_accessors.h after the necessary structure has been
defined, so that lfs_accessors.h can emit functions in terms of it.
2015-07-28 05:09:34 +00:00
prlw1 9521ae7bfd Fix typos 2015-04-28 09:48:30 +00:00
mlelstv 6fa7c3413b Fix handling of NAME aliases in /etc/fstab. 2013-09-08 13:26:05 +00:00
dholland 2737439da3 fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
2013-06-23 02:06:04 +00:00
dholland f1333577b5 Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
2013-06-19 17:51:25 +00:00
christos 78f1cd9f5b handle new lfs split 2013-06-15 01:27:19 +00:00
dholland dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
dholland 1df724eeb6 Use __printflike. 2013-01-13 23:45:35 +00:00
dholland 0f01602e5e Use void * for I/O functions and remove no-longer-needed casts. 2013-01-13 23:17:18 +00:00
dholland aaa9827ea1 Use more static. 2013-01-13 23:07:16 +00:00
dholland a010b743a6 Use static; remove unused global var this uncovered. 2013-01-13 22:59:31 +00:00
dholland 895e26fb92 Use <ctype.h> functions correctly. 2013-01-13 22:54:24 +00:00
dholland 9c53e91b7d Add some const. 2013-01-13 22:53:01 +00:00
dholland 06b26cd86b Use more markup, fix English usage. 2012-08-29 18:46:13 +00:00
joerg e16a720f89 Don't depend on HAVE_GCC being always defined. 2012-08-10 12:20:10 +00:00
christos 57ca898c48 remove ancient crap 2012-05-05 21:03:02 +00:00
christos ca11e1e667 factor out rawname() from dump, fsck, savecore. 2012-04-07 16:44:10 +00:00
christos 5727fadda2 use getfsspecname() 2012-04-07 04:52:20 +00:00
wiz ea95a8c187 Sort option descriptions a bit more. 2012-02-19 21:32:02 +00:00
christos fd6f00f4bf PR/45735: Bug Hunting: The dump(8) manpage, as well as the program's `usage'-line,
needs improvement
2012-02-19 19:49:20 +00:00
plunky 2b8aaed8cd NULL does not need a cast, here 2011-09-16 16:13:16 +00:00
joerg baa8e84b6f Use __dead 2011-08-29 14:34:58 +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
hannken 05e91bfee8 fss(4): Allow FSSIOCSET to set the initial flags. Add a new flag
"FSS_UNLINK_ON_CREATE" to unlink the backing store before
        the snapshot gets created.

With this change dump(8) no longer dumps the zero-sized, but named
snapshot it is working on.  Same applies to fsck_ffs(8).
2011-02-24 09:38:57 +00:00
hannken 08a60b309b File system snapshots are no longer experimental. 2010-11-05 10:02:53 +00:00
jruoho 04636eae18 Use a list for the list of bugs. 2010-05-14 05:04:58 +00:00