Commit Graph

194 Commits

Author SHA1 Message Date
mrg aaaf76dce5 include the filename in the panic message for missing data.
instead of merely seeing:
	getfile: lost data
now this is seen:
	getfile: lost data: ./usr/libdata/debug/usr/libexec/cc1.debug
2022-05-05 07:45:43 +00:00
christos daa5207d25 Fix reversed test (thanks phone@) 2021-08-29 09:17:58 +00:00
christos 670efce4f5 fix wrong size (thanks mlelstv@) 2021-08-29 09:15:33 +00:00
riastradh 9e8e52123d restore(8): Mark fail_dirtmp __dead to fix clang build. 2021-06-23 14:22:08 +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
msaitoh 44f4353477 s/skiping/skipping/ 2021-03-11 01:13:11 +00:00
bouyer 33be3b5b89 If we hit an unknown header type (likely to be a corrupt record), and
the user choose to not abort, skip to the next header instead of trying
to use it.
This allowed me to recover files from a corrupt dump, instead of
getting a segfault.
2020-09-03 19:31:34 +00:00
joerg 6ce4f404a1 Fix depenency on common symbols in sbin. 2020-04-05 15:25:39 +00:00
msaitoh 88af233251 s/opration/operation/ 2019-12-27 07:41:22 +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
mrg fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
wiz 75bef1827d Remove superfluous macro. 2018-07-18 17:57:00 +00:00
dholland be73ca0156 Document what rrestore is (was once) for. PR 53442.
CVS: ----------------------------------------------------------------------
2018-07-15 06:16:12 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
enami c1e351a1b2 Don't truncate at microseconds while preserving timestamps.
One of motivation of this change is to make the behavior of test(1)
-nt/ot with preserved copy (like cp -p) closer to the NetBSD 6.
Of course whether full timestamps are kept or not depends also on
underlying file system.

The ifdef added in mv(1) since existing ifdefs was our local change
to compile it on solaris (though I couldn't test it):
http://mail-index.netbsd.org/tech-userlevel/2014/11/28/msg008831.html
2015-03-02 03:17:24 +00:00
dholland 5a420c1b9a Stick UFS_ in front of these symbols:
DIRBLKSIZ
   DIRECTSIZ
   DIRSIZ
   OLDDIRFMT
   NEWDIRFMT

Part of PR 47909.
2013-06-09 17:57:08 +00:00
rodent 6212f5ad46 s/user code/user mode/1 2013-03-30 11:07:40 +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
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
dholland 4804dbd307 Add wrapper functions around hash algorithm operations to avoid
undefined behavior arising from illegal function casts. As a side
effect, no longer need -Wno-pointer-sign either.
2011-08-06 20:46:42 +00:00
dholland 51080e041d Simplify silly code and make it closer to type-safe. This causes amd64
gcc to reorder two pairs of instructions for some reason but the object
files are otherwise unchanged.
2011-08-06 17:01:06 +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
wiz 80172dbf65 Fix fd leak. Found by cppcheck. 2011-01-04 23:46:34 +00:00
mbalmer 8e64e5f559 Fix grammar in a line of output.
From Hywel Mallett via FreeBSD.
2010-05-12 21:21:59 +00:00
lukem 292ab8c29d fix sign-compare issues 2009-04-07 12:38:12 +00:00
yamt dacc2a910d remove a useless cast. 2009-02-22 15:28:43 +00:00
yamt bbac3fbde4 remove a useless cast. 2009-02-18 13:13:27 +00:00
enami ca82f7eac5 Use indent-synopsis instead of iS register. The latter is a register
used in BSD derived .Nm implementation.
2009-01-30 11:55:04 +00:00
hannken 7586bc881e Make restore work for Linux dump volumes by ignoring extended attribute
records on these volumes.  Tested with Centos 5.2.

Reviewed by: Manuel Bouyer <bouyer@netbsd.org>
2008-12-26 19:26:04 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
lukem 6543a91fea Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
matt 6a2c9c06cc Fix some inconsisent/conflicting definitions and missing parameters 2008-02-16 17:58:01 +00:00
tron 04dc8ab30b Bump date because of last change. 2007-04-30 12:33:13 +00:00
tron 962652c0b2 Improve example of restoring a complete filesystem with "restore -r":
- NetBSD's "newfs" doesn't accept a second (non-option) argument.
  Patch provided by Jeff Ito in PR bin/36241.
- Use "sd0" instead of "rp0" because NetBSD's doesnt have a disk driver
  called "rp".
- Use "/dev/rst0" instead of "/dev/rst8". With NetBSD's device numbering
  scheme a system would have to have 9 tape drives to get "/dev/rst8".
2007-04-30 12:32:35 +00:00
hannken f67846b19f Add support for Solaris ufsdump volumes with more than 512*1024 inodes.
Here the bitmaps are written as

	CLRI or BITS with c_count <= 512
	ADDR* for the remaining blocks

Remove the bitmap handling from getfile(), remove xtrmap() and xtrmapskip().
Add new function getbitmap() modeled after getfile() that does bitmap
allocation, bitmap expansion and sets maxino.

Reviewed by: Manuel Bouyer <bouyer@netbsd.org>
2007-02-09 09:36:02 +00:00
christos 746c5b06eb Convert a couple of "(void)&" constructs to volatile.
Flag various unused parameters in restore and dump so that these will
compile with -Wextra.  (Note: restore uses some stuff from dump.)
2006-12-18 20:07:32 +00:00
christos 9e74871aa3 find rmd160.h 2006-10-30 01:21:53 +00:00
christos dcd203dd29 c99 iniitializer 2006-10-16 03:12:23 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
christos 731d9b0c04 Coverity CID 2305: Fix memory leak. 2006-03-20 01:51:54 +00:00
elad f9faf32a34 Use crypto/rmd160.h. 2005-09-25 04:16:22 +00:00
christos 982d8230de use d_fileno instead of d_ino for consistency 2005-08-19 06:44:06 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
christos 58874431a5 add const 2005-06-27 02:03:28 +00:00
christos cb1c4f11bb sprinkle const. 2005-06-27 01:55:52 +00:00
xtraeme f224c38b66 Kill __P(), use ANSI function declarations. 2005-02-17 15:00:33 +00:00
wiz 36cdbd4840 Bump date for recent changes. 2005-01-11 09:39:12 +00:00
fredb 57aad81b8e Make a judicious choice as to whether to apply the permissions
of the root inode of the dump to the current working directory,
rather than interrogate the user. Closes PR bin/24690. Reviewed
by bouyer, tron, imp.
2005-01-08 14:30:39 +00:00
wiz 2f2f733ec3 Sort options. 2004-10-24 17:01:22 +00:00