summaryrefslogtreecommitdiff
path: root/sbin/dump
AgeCommit message (Collapse)Author
2015-08-20<stdlib.h> is included, so do not need to cast result fromTheo de Raadt
malloc, calloc, realloc* ok krw millert
2015-05-23Canonicalize all devices to DUIDs in order to make -w and -W output consistent.Philip Guenther
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.Philip Guenther
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.Todd C. Miller
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, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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 stuffPhilip Guenther
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;Jason McIntyre
From: Maximilian Fillinger
2014-07-11make dump support DUIDs for command line arguments and /etc/dumpdates (usingAlexander Hall
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 byteKenneth R Westerback
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:Christian Weisgerber
* 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 callKenneth R Westerback
them 'blocks' not 'sectors'.
2014-05-31Cast daddr_t variable (blkno) to (long long) when printing with %lld.Kenneth R Westerback
2014-05-31add -S to usage();Jason McIntyre
2014-05-30Add option -S to have dump(8) only estimate backup size and number of tapesStephan A. Rickauer
required (from NetBSD). ok beck@, krw@ and sthen@
2014-05-27Where trying to pread() a single disk sector, the i/o must be for theKenneth R Westerback
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 inKenneth R Westerback
favour of DEV_BSIZE. No-op on 512-byte sector devices.
2014-05-21Nuke some trailing whitespace and break some long lines to shrinkKenneth R Westerback
subsequent diffs.
2014-05-20As suggested by guenther@ and millert@, replace seek+[read|write] withKenneth R Westerback
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.Theo de Raadt
Careful second audit by millert
2013-11-12add a variety of missing prototypesTheo de Raadt
2013-11-02No need to cast constants or simple variables to (daddr_t). UseKenneth R Westerback
(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 enoughTheo de Raadt
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@Otto Moerbeek
2013-04-23handle large ino_t; ok teduTheo de Raadt
2013-04-16remove casts to time_t * which are not neededTheo de Raadt
2013-04-16do not need to cast type to same typeTheo de Raadt
2013-04-04Make our dump(8) honour the "nodump" flag for directories, effectivelyVadim Zhukov
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@.Martynas Venckus
2012-08-22- open a remote file/device with the same flags we use when opening aAlexander Hall
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 handlerTheo de Raadt
2009-11-12free flagsp if flags variable indicates it was not used, found by parfait; ↵Theo de Raadt
ok millert
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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;Jason McIntyre
2008-01-11compute transfer rate using 64-bit arithmetic, ok sthen@ millert@Otto Moerbeek
2008-01-02remove unused functionsCharles Longeau
initially from tobias@, and I removed an unused struct too ok moritz@ tobias@
2007-11-19put the SIGINFO blurb in a saner place;Jason McIntyre
2007-11-18do not confuse the reader telling he should use a towers of hanoiOtto Moerbeek
based scheme when it makes no sense: a weekly schedule does not benefit from it. ok mbalmer@ jmc@ ray@
2007-09-10Proper use of fseek/fseeko macros.Tobias Stoeckmann
OK joris@, otto@
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-06-15don't use static data in recursive functions; from FreeBSD; fixes PR 5509Otto Moerbeek
and other reports about dump accessing wrong blocks; ok beck@ deraadt@
2007-06-11When dumping ffs1, store old_atime and old_mtime too.Todd C. Miller
2007-06-03Add ffs2 support to dump/restore. From FreeBSD with some NetBSD changes.Todd C. Miller
With help from otto@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-04-10Rewrite ITITERATE macro to prevent out-of-bounds memory access.Moritz Jodeit
This makes dump -u work with malloc debugging enabled. ok millert@
2007-03-19Add FFS2 fields to the superblock, change file system tools to keepPedro Martelletto
accessing FFS1 fields, okay art@, quite some testing by ckuethe@, simon@ and thib@, thanks.
2007-03-06Add and fix /* FALLTHROUGH */ comments.Ray Lai
From Jim Razmus. OK millert@ and otto@.
2007-03-04memory leak found by coverity; Jim RazmusTheo de Raadt
2007-03-04delete sunos junk; Jim RazmusTheo de Raadt
2007-02-25shuffle the text slightly into a more logical order;Jason McIntyre