summaryrefslogtreecommitdiff
path: root/sbin/dump
AgeCommit message (Collapse)Author
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
2007-02-25the -W and -w flags do not need a separate synopsis;Jason McIntyre
2007-02-25move the text describing 4.3 syntax compatibility to HISTORY, ratherJason McIntyre
than slap bang in SYNOPSIS;
2007-02-25document the "opaque", "arch", and "nodump" flags more fully;Jason McIntyre
closes documentation/5384 from Andrew Hamilton-Wright help from henning, otto, and weingart
2007-02-22igor sobrado spotted that although we have mlinks for rdump andJason McIntyre
rrestore, the pages they point to don;t actually mention them. so make it clear that their functionality is now integral in dump and restore, and sync the text a little between the two pages; help/ok otto
2007-02-20Change hard coded numbers to sizeof(buf). Also change someRay Lai
sizeof(buf) - 1 to sizeof(buf), since fgets takes the whole buffer size. Based on diff from Charles Longeau <chl at tuxfamily dot org> long ago. OK millert@.
2006-12-26fts_read returning NULL and errno set is an error. ok ray@Otto Moerbeek