summaryrefslogtreecommitdiffstats
path: root/sbin/dump
AgeCommit message (Collapse)AuthorFilesLines
2021-01-21Rearrange variables in dump / restore to handle -fno-common.mortimer6-71/+93
Largely following the commit by mckusick in FreeBSD. ok naddy@
2020-10-01Only count the proper node types. Avoid out of-bound access for largeotto1-2/+5
filesystems. From FreeBSD. ok millert@
2019-12-19Spell "mount point" as other man pages do, with a space.bentley1-3/+3
ok jmc@
2019-09-02More correction of section 3 layout. directory->opendir, fts->fts_open,deraadt1-4/+4
getcap->cgetent. pwcache->user_from_uid. And then repair references. ok jmc
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt4-17/+17
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-01-22Don't use dangerous idiom for qsort comparison function; ok deraadt@otto1-2/+3
2018-06-07add some EXIT STATUS sections; from matthew martinjmc1-5/+5
2018-04-26Cast a multiplicand to ino_t to avoid overflow in 32*32=64 calculationsguenther2-4/+4
ok pirofti@ krw@
2017-12-08Convert snprintf+write into dprintf. It is simply easier to read, andderaadt1-4/+3
provides retry on short-write file descriptors. ok florian, previous versions seen by millert
2016-10-06fix HISTORY;schwarze1-3/+3
patches from Sevan Janiyan <venture37 at geeklan dot co dot uk>; verified using minnie.tuhs.org/cgi-bin/utree.pl
2016-08-31Delete SIGTRAP, SIGFPE, SIGBUS, and SIGSEGV handlers. Such patternsderaadt1-18/+1
don't help improve code because they block core dumps and there reduce inspection of bugs thus work on fixes. Secondly, these handlers are *stdio signal races* so they can produce different coredumps deep inside stdio.
2016-06-07per trending style, add continue to emtpy loop bodies.tedu1-2/+2
ok mglocker
2016-03-30for some time now mandoc has not required MLINKS to functionjmc1-2/+1
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2015-12-22assign pointers to NULL rather than 0, remove a needless castmmcc1-6/+6
2015-11-21add missing NAME entries; ok schwarzejmc1-3/+4
2015-10-12Annotate an pretty obvious signal race... no time to fix it now.deraadt1-1/+2
2015-08-20<stdlib.h> is included, so do not need to cast result fromderaadt4-16/+13
malloc, calloc, realloc* ok krw millert
2015-05-23Canonicalize all devices to DUIDs in order to make -w and -W output consistent.guenther4-8/+61
Based on diff from Manuel Giraud (manuel (at) ledu-giraud.fr) Thanks!
2015-05-03Eliminate the -U flag and make usage of DUID in /etc/dumpdates the default.guenther4-38/+29
Correct old style entries so nothing has to be done for the admin. diff from Manuel Giraud (manuel (at) ledu-giraud.fr) Thanks!
2015-03-15tzfile.h is an internal header that should never have been installed.millert1-2/+3
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orderaadt3-6/+6
delete <sys/param.h> if now possible ok guenther
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt6-17/+24
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-09-03Kill off compat for systems that don't define NAME_MAX or that lack stuffguenther1-27/+6
like, oh, strchr() and prototypes for read() and write(). Mark quit() as both __dead and printf-like, and dumpabort() as __dead. ok krw@
2014-07-17files-to-dump can be a duid;jmc1-4/+6
From: Maximilian Fillinger
2014-07-11make dump support DUIDs for command line arguments and /etc/dumpdates (usinghalex5-16/+59
the new shiny -U switch) dumpdates part originating from, and discussed with, Maximilian Fillinger seems reasonable to krw@, "get it in" deraadt@
2014-07-10Add internal buffering when dumping a device with non-512 bytekrw1-8/+50
sectors. This ensures that the requested data, and all the requested data, is actually read from the device. Should have no effect on 512-byte sector devices, but makes dump work on 4096-byte sector devices. Problem noted by and fix tested by David Vasek.
2014-06-13Type cleanup:naddy4-40/+42
* Move all off_t variables that don't look like file sizes to int64_t. * Switch blockswritten to int64_t, so it won't wrap at 2TB. * Same for blocksthisvol (from deraadt@). * Switch xferrate (from tedu@) and blocksperfile from long to uint64_t. * Since blocksperfile can be set with -B, move numarg() from long to long long and don't mark small integer constant arguments as long. ok deraadt@, tedu@
2014-05-31Oops. We're reporting DEV_BSIZE values in error messages, so callkrw1-3/+3
them 'blocks' not 'sectors'.
2014-05-31Cast daddr_t variable (blkno) to (long long) when printing with %lld.krw1-3/+3
2014-05-31add -S to usage();jmc1-2/+2
2014-05-30Add option -S to have dump(8) only estimate backup size and number of tapesstephan2-5/+19
required (from NetBSD). ok beck@, krw@ and sthen@
2014-05-27Where trying to pread() a single disk sector, the i/o must be for thekrw2-10/+21
actual disk sector size and not DEV_BSIZE. The sector size must be obtained via the disklabel. Larger i/o's must be multiple sectors, so when retrying with a smaller size shrink the attempt by one sector and not DEV_BSIZE. Of course if your d_secsize is DEV_BSIZE, this will all be a no-op. This does not make non-512-byte sectors work, but puts in place the logic to get and use the disklabel info. Which makes the next diffs bite sized and focused. ok guenther@
2014-05-24Nuke last of the illusionary 'dev_bsize' and 'dev_bshift' variables inkrw4-24/+20
favour of DEV_BSIZE. No-op on 512-byte sector devices.
2014-05-21Nuke some trailing whitespace and break some long lines to shrinkkrw2-12/+15
subsequent diffs.
2014-05-20As suggested by guenther@ and millert@, replace seek+[read|write] withkrw1-7/+5
p[read|write]. Makes the code much clearer by eliminating extra error checking and verbiage. No intentional functional change. Tweaks by and ok guenther@
2013-11-22Whole bunch of (unsigned char) casts carefully added for ctype calls.deraadt1-2/+2
Careful second audit by millert
2013-11-12add a variety of missing prototypesderaadt4-4/+19
2013-11-02No need to cast constants or simple variables to (daddr_t). Usekrw1-2/+2
(u_int64_t) instead of (daddr_t) when casting a variable in an expression passed to DL_SETDSIZE(). Change a variable counting open files from daddr_t to int64_t. ok deraadt@ with the tweak to fix that pesky expression.
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt3-19/+19
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-04-25big int_t/time_t fixes; ok deraadt@ krw@otto2-7/+9
2013-04-23handle large ino_t; ok teduderaadt2-5/+6
2013-04-16remove casts to time_t * which are not neededderaadt1-2/+2
2013-04-16do not need to cast type to same typederaadt2-4/+4
2013-04-04Make our dump(8) honour the "nodump" flag for directories, effectivelyzhuk2-39/+73
disabling dumping their contents. input and ok otto@ millert@ man page bits input and ok jmc@
2013-01-06The sparc optimization bug is believed to be fixed. OK naddy@.martynas1-5/+1
2012-08-22- open a remote file/device with the same flags we use when opening ahalex1-4/+4
local one - replace a few magic numbers with the appropriate constants ok millert@ (pre-lock)
2011-04-25do not use stdio in the (stupid) SIGSEGV handlerderaadt1-2/+4
2009-11-12free flagsp if flags variable indicates it was not used, found by parfait; ok millertderaadt1-3/+4
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt6-60/+6
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2008-01-26the kids want I/O;jmc1-3/+3