summaryrefslogtreecommitdiffstats
path: root/sbin/savecore
Commit message (Collapse)AuthorAgeFilesLines
* MFC r316742:ngie2017-05-311-2/+2
| | | | | | Clarify units for mediasize and sectorsize in DoFile(..) They're byte quantities.
* MFC r316740:ngie2017-05-311-1/+2
| | | | | | | | Clarify `minfree` warning message in check_space(..) - State that the units are kB. - Be more complete/concise in terms of what is required (in this case `minfree` must be at least `X`kB)
* MFC r313946:trasz2017-03-191-1/+1
| | | | | Make savecore(8) output nicer by specifying the maximum field width instead of minimum one (precision instead of width).
* Don't leak fd on sectorsize malloc failurengie2016-04-201-1/+2
| | | | | | | | | | | | Also, call endfsent after calling getfsent (i.e. when not explicitly called with a swap device) for code cleanliness CID: 1354785 Differential Revision: https://reviews.freebsd.org/D6014 X-MFC with: r298076 Reported by: Coverity Reviewed by: cem Sponsored by: EMC / Isilon Storage Division
* MFHgjb2016-04-161-8/+25
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * savecore(8): Explicitly cast to fix i386 warningcem2016-04-151-3/+3
| |
| * Add 4Kn kernel dump supportcem2016-04-151-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (And 4Kn minidump support, but only for amd64.) Make sure all I/O to the dump device is of the native sector size. To that end, we keep a native sector sized buffer associated with dump devices (di->blockbuf) and use it to pad smaller objects as needed (e.g. kerneldumpheader). Add dump_write_pad() as a convenience API to dump smaller objects with zero padding. (Rather than pull in NPM leftpad, we wrote our own.) Savecore(1) has been updated to deal with these dumps. The format for 512-byte sector dumps should remain backwards compatible. Minidumps for other architectures are left as an exercise for the reader. PR: 194279 Submitted by: ambrisko@ Reviewed by: cem (earlier version), rpokala Tested by: rpokala (4Kn/512 except 512 fulldump), cem (512 fulldump) Relnotes: yes Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5848
* | Explicitly add more files to the 'runtime' package.gjb2016-02-091-0/+1
|/ | | | Sponsored by: The FreeBSD Foundation
* Add more text to explain --libxo flag.rodrigc2015-12-011-1/+11
|
* savecore(8): Be quiet unless the user asks for verbosecem2015-11-071-7/+10
| | | | | | | Make savecore(8) more suitable for init-time scripts; be quiet by default. Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3229
* Always check the return value of lseek.asomers2015-11-061-6/+4
| | | | | | | | | | | | This is a follow-up to r289845, which only fixed one occurence of CID 1009429. Coverity CID: 1009429 Reviewed by: markj MFC after: 2 weeks X-MFC-With: r289845 Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D4096
* Fix various Coverity issues in sbin/savecore/savecore.c:asomers2015-10-231-6/+6
| | | | | | | | | | | | | CID1009429: Fix unchecked return value from lseek while clearing dump CID1007781: Fix file descriptor leak in DoFile CID1007261: Don't send potentially unterminated string to syslog(3) Coverity CID: 1009429 Coverity CID: 1007781 Coverity CID: 1007261 MFC after: 2 weeks Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D3991
* Make libxo depend on libutil because it uses humanize_number after r287111ngie2015-10-181-1/+1
| | | | | | | | Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division
* Update META_MODE dependencies.bdrewery2015-09-171-0/+1
|
* Upgrade libxo to 0.4.5.marcel2015-08-241-1/+1
| | | | | | | Local changes incorporated by 0.4.5: r284340 Local changes retained: r276260, r282117 Obtained from: https://github.com/Juniper/libxo
* Add META_MODE support.sjg2015-06-131-0/+20
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-273-25/+51
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-1/+5
| |\
| * | Updated dependenciessjg2014-05-161-1/+0
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Merge headsjg2014-04-281-2/+2
| |\ \
| * | | Updated dependenciessjg2013-03-111-0/+1
| | | |
| * | | Updated dependenciessjg2013-02-161-2/+0
| | | |
| * | | Sync with HEAD.obrien2013-02-082-41/+147
| |\ \ \
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | Convert savecore to libxo. The 'verbose' paths still use printf since they'rescottl2015-03-222-24/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | meant for interactivity on the command line and contain a lot of redundant information. Obtained from: Netflix, Inc.
* | | | | Convert sbin/ to LIBADDbapt2014-11-251-2/+1
| |_|_|/ |/| | | | | | | | | | | Reduce overlinking
* | | | If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fixbdrewery2014-09-171-1/+5
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | a FILE* leak in getbounds(). Submitted by: Conrad Meyer <conrad.meyer@isilon.com> PR: 192032 Sponsored by: EMC / Isilon Storage Division MFC after: 1 week
* | | Fix double fclose() in an error case.brueffer2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | CID: 1006120 Found with: Coverity Prevent(tm) MFC after: 1 week
* | | Log the name of the device that we failed to open rather than anmarkj2014-03-051-1/+1
| |/ |/| | | | | | | | | uninitialized buffer. MFC after: 3 days
* | With rotating kernel dumps the higest dump number is not necessarily thepjd2012-12-161-1/+29
| | | | | | | | | | | | | | | | | | | | | | last one. To make it easier to find the last one create symlinks with 'last' suffix that will point to the files of the last coredump, eg.: info.last -> info.5 textdump.tar.last.gz -> textdump.tar.5.gz Reviewed by: avg Obtained from: WHEEL Systems
* | Implement -m option to savecore(8) that allows to limit number of kernelpjd2012-12-162-21/+96
| | | | | | | | | | | | | | dumps stored. Once the limit is reached it restarts from 0. Reviewed by: avg Obtained from: WHEEL Systems
* | Make use of the fact that we changed working directory to the dump directorypjd2012-12-161-4/+3
| | | | | | | | | | | | earlier. Obtained from: WHEEL Systems
* | Sort flags properly.pjd2012-12-161-3/+3
| | | | | | | | Obtained from: WHEEL Systems
* | Prefer snprintf() over sprintf().pjd2012-12-161-5/+5
| | | | | | | | Obtained from: WHEEL Systems
* | - When checking if a dump exists on the given device there is no need topjd2012-12-142-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | provide dump directory. Eliminate this redundant argument. This changes the usage, but the only risk here is that a warning will be printed about directory given as device. - Update usage of -C option. - When clearing dump header from the given device there is also no need to provide dump directory, although additional arguments for -c were not documented. - Document that -v can be used with -c and that list of devices can be given. Obtained from: WHEEL Systems
* | The clear option (-c) is not compatible with keep (-k) and compress (-z)pjd2012-12-141-0/+2
| | | | | | | | | | | | options. Obtained from: WHEEL Systems
* | If we are not going to clear the dump (we are either just checking if the dumppjd2012-12-141-2/+2
| | | | | | | | | | | | exists or we want to keep it), open device read-only. Obtained from: WHEEL Systems
* | Whitespace cleanups.pjd2012-12-141-6/+6
|/
* Include <signal.h> (for SIGINFO).rmh2012-04-091-0/+1
|
* Remove duplicated header fileskevlo2011-06-241-1/+0
|
* Remove the advertising clause from UCB copyrighted files in sbin. Thisjoel2010-12-121-4/+0
| | | | | is in accordance with the information at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
* Switch the default WARNS level for sbin/ to 6.ru2009-10-191-1/+0
| | | | Submitted by: Ulrich Spörlein
* Fixed markup.ru2009-09-171-3/+5
|
* - Add a SIGINFO handler for savecore.lulf2009-08-251-1/+17
|
* Correct the information about when the respective functionality firstbrueffer2009-04-231-1/+1
| | | | | | | | appeared in FreeBSD. PR: 133785 Submitted by: Ulrich Spoerlein <uqs@spoerlein.net> MFC after: 3 days
* Apply various fixes:trhodes2008-12-241-2/+2
| | | | | | | | | Silence mdoc(7) warnings; Xref correct manual pages; Point user to the ddb.8 manual page. PR: 129398 Submitted by: gavin
* Compare kernel dump header magic with textdump magic using strncmp()rwatson2007-12-271-11/+31
| | | | | | | | | | | | rather than the memcmp() which is used for regular dumps: the textdump string is one character shorter, so we need to stop comparing at the end of the string. Use independent version checking logic for architecture-specific version number vs. textdump version number, as the version sequences may (someday) differ. Run into by: rrs
* Teach savecore(8) how to extract textdump(4) dumps.rwatson2007-12-262-79/+171
| | | | | | Update savecore(8) man page to reflect textdump additions. MFC after: 3 months
OpenPOWER on IntegriCloud