summaryrefslogtreecommitdiffstats
path: root/sbin/dump (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rearrange variables in dump / restore to handle -fno-common.mortimer2021-01-216-71/+93
| | | | | | Largely following the commit by mckusick in FreeBSD. ok naddy@
* Only count the proper node types. Avoid out of-bound access for largeotto2020-10-011-2/+5
| | | | filesystems. From FreeBSD. ok millert@
* Spell "mount point" as other man pages do, with a space.bentley2019-12-191-3/+3
| | | | ok jmc@
* More correction of section 3 layout. directory->opendir, fts->fts_open,deraadt2019-09-021-4/+4
| | | | | getcap->cgetent. pwcache->user_from_uid. And then repair references. ok jmc
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-284-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.
* Don't use dangerous idiom for qsort comparison function; ok deraadt@otto2019-01-221-2/+3
|
* add some EXIT STATUS sections; from matthew martinjmc2018-06-071-5/+5
|
* Cast a multiplicand to ino_t to avoid overflow in 32*32=64 calculationsguenther2018-04-262-4/+4
| | | | ok pirofti@ krw@
* Convert snprintf+write into dprintf. It is simply easier to read, andderaadt2017-12-081-4/+3
| | | | | provides retry on short-write file descriptors. ok florian, previous versions seen by millert
* fix HISTORY;schwarze2016-10-061-3/+3
| | | | | patches from Sevan Janiyan <venture37 at geeklan dot co dot uk>; verified using minnie.tuhs.org/cgi-bin/utree.pl
* Delete SIGTRAP, SIGFPE, SIGBUS, and SIGSEGV handlers. Such patternsderaadt2016-08-311-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.
* per trending style, add continue to emtpy loop bodies.tedu2016-06-071-2/+2
| | | | ok mglocker
* for some time now mandoc has not required MLINKS to functionjmc2016-03-301-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
* assign pointers to NULL rather than 0, remove a needless castmmcc2015-12-221-6/+6
|
* add missing NAME entries; ok schwarzejmc2015-11-211-3/+4
|
* Annotate an pretty obvious signal race... no time to fix it now.deraadt2015-10-121-1/+2
|
* <stdlib.h> is included, so do not need to cast result fromderaadt2015-08-204-16/+13
| | | | | malloc, calloc, realloc* ok krw millert
* Canonicalize all devices to DUIDs in order to make -w and -W output consistent.guenther2015-05-234-8/+61
| | | | Based on diff from Manuel Giraud (manuel (at) ledu-giraud.fr) Thanks!
* Eliminate the -U flag and make usage of DUID in /etc/dumpdates the default.guenther2015-05-034-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!
* tzfile.h is an internal header that should never have been installed.millert2015-03-151-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@
* Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orderaadt2015-01-203-6/+6
| | | | | delete <sys/param.h> if now possible ok guenther
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-166-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)
* Kill off compat for systems that don't define NAME_MAX or that lack stuffguenther2014-09-031-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@
* files-to-dump can be a duid;jmc2014-07-171-4/+6
| | | | From: Maximilian Fillinger
* make dump support DUIDs for command line arguments and /etc/dumpdates (usinghalex2014-07-115-16/+59
| | | | | | | | the new shiny -U switch) dumpdates part originating from, and discussed with, Maximilian Fillinger seems reasonable to krw@, "get it in" deraadt@
* Add internal buffering when dumping a device with non-512 bytekrw2014-07-101-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.
* Type cleanup:naddy2014-06-134-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@
* Oops. We're reporting DEV_BSIZE values in error messages, so callkrw2014-05-311-3/+3
| | | | them 'blocks' not 'sectors'.
* Cast daddr_t variable (blkno) to (long long) when printing with %lld.krw2014-05-311-3/+3
|
* add -S to usage();jmc2014-05-311-2/+2
|
* Add option -S to have dump(8) only estimate backup size and number of tapesstephan2014-05-302-5/+19
| | | | | | required (from NetBSD). ok beck@, krw@ and sthen@
* Where trying to pread() a single disk sector, the i/o must be for thekrw2014-05-272-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@
* Nuke last of the illusionary 'dev_bsize' and 'dev_bshift' variables inkrw2014-05-244-24/+20
| | | | favour of DEV_BSIZE. No-op on 512-byte sector devices.
* Nuke some trailing whitespace and break some long lines to shrinkkrw2014-05-212-12/+15
| | | | subsequent diffs.
* As suggested by guenther@ and millert@, replace seek+[read|write] withkrw2014-05-201-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@
* Whole bunch of (unsigned char) casts carefully added for ctype calls.deraadt2013-11-221-2/+2
| | | | Careful second audit by millert
* add a variety of missing prototypesderaadt2013-11-124-4/+19
|
* No need to cast constants or simple variables to (daddr_t). Usekrw2013-11-021-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.
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-113-19/+19
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* big int_t/time_t fixes; ok deraadt@ krw@otto2013-04-252-7/+9
|
* handle large ino_t; ok teduderaadt2013-04-232-5/+6
|
* remove casts to time_t * which are not neededderaadt2013-04-161-2/+2
|
* do not need to cast type to same typederaadt2013-04-162-4/+4
|
* Make our dump(8) honour the "nodump" flag for directories, effectivelyzhuk2013-04-042-39/+73
| | | | | | | disabling dumping their contents. input and ok otto@ millert@ man page bits input and ok jmc@
* The sparc optimization bug is believed to be fixed. OK naddy@.martynas2013-01-061-5/+1
|
* - open a remote file/device with the same flags we use when opening ahalex2012-08-221-4/+4
| | | | | | | local one - replace a few magic numbers with the appropriate constants ok millert@ (pre-lock)
* do not use stdio in the (stupid) SIGSEGV handlerderaadt2011-04-251-2/+4
|
* free flagsp if flags variable indicates it was not used, found by parfait; ok millertderaadt2009-11-121-3/+4
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-276-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
* the kids want I/O;jmc2008-01-261-3/+3
|