rodrigc
9405dd95c9
Add more text to explain --libxo flag.
2015-12-01 19:18:53 +00:00
cem
f7f2a93345
savecore(8): Be quiet unless the user asks for verbose
...
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
2015-11-07 23:27:03 +00:00
asomers
d527e5dce9
Always check the return value of lseek.
...
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
2015-11-06 19:18:20 +00:00
asomers
f11412f79e
Fix various Coverity issues in sbin/savecore/savecore.c:
...
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
2015-10-23 19:28:24 +00:00
ngie
5c0da1966c
Make libxo depend on libutil because it uses humanize_number after r287111
...
Remove overlinking in lib/libxo/tests, sbin/savecore, and
usr.bin/{iscsictl,wc,xo}
PR: 203673
Sponsored by: EMC / Isilon Storage Division
2015-10-18 07:30:50 +00:00
bdrewery
bdebc05d94
Update META_MODE dependencies.
2015-09-17 05:06:34 +00:00
marcel
02ffac2cca
Upgrade libxo to 0.4.5.
...
Local changes incorporated by 0.4.5: r284340
Local changes retained: r276260, r282117
Obtained from: https://github.com/Juniper/libxo
2015-08-24 16:26:20 +00:00
sjg
008d7c831f
Add META_MODE support.
...
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
2015-06-13 19:20:56 +00:00
sjg
75a137820d
dirdeps.mk now sets DEP_RELDIR
2015-06-08 23:35:17 +00:00
sjg
65145fa4c8
Merge sync of head
2015-05-27 01:19:58 +00:00
scottl
ae2db51f38
Convert savecore to libxo. The 'verbose' paths still use printf since they're
...
meant for interactivity on the command line and contain a lot of redundant
information.
Obtained from: Netflix, Inc.
2015-03-22 17:29:14 +00:00
bapt
6fdc031751
Convert sbin/ to LIBADD
...
Reduce overlinking
2014-11-25 11:23:12 +00:00
sjg
b137080f19
Merge from head@274682
2014-11-19 01:07:58 +00:00
bdrewery
3f85fc7387
If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fix
...
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
2014-09-17 19:09:58 +00:00
sjg
5860f0d106
Updated dependencies
2014-05-16 14:09:51 +00:00
sjg
1a7e48acf1
Updated dependencies
2014-05-10 05:16:28 +00:00
sjg
5e568154a0
Merge head
2014-04-28 07:50:45 +00:00
brueffer
8ac2dd562f
Fix double fclose() in an error case.
...
CID: 1006120
Found with: Coverity Prevent(tm)
MFC after: 1 week
2014-04-14 21:44:34 +00:00
markj
bfcbf2a469
Log the name of the device that we failed to open rather than an
...
uninitialized buffer.
MFC after: 3 days
2014-03-05 04:15:17 +00:00
sjg
6d37b86f2b
Updated dependencies
2013-03-11 17:21:52 +00:00
sjg
0ee5295509
Updated dependencies
2013-02-16 01:23:54 +00:00
obrien
3028e3f8ab
Sync with HEAD.
2013-02-08 16:10:16 +00:00
pjd
81a7aa503c
With rotating kernel dumps the higest dump number is not necessarily the
...
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
2012-12-16 23:09:27 +00:00
pjd
c5cbd42d14
Implement -m option to savecore(8) that allows to limit number of kernel
...
dumps stored. Once the limit is reached it restarts from 0.
Reviewed by: avg
Obtained from: WHEEL Systems
2012-12-16 23:06:12 +00:00
pjd
f3f8bbc498
Make use of the fact that we changed working directory to the dump directory
...
earlier.
Obtained from: WHEEL Systems
2012-12-16 23:04:31 +00:00
pjd
1df9cc8b3f
Sort flags properly.
...
Obtained from: WHEEL Systems
2012-12-16 22:59:58 +00:00
pjd
e18befc88a
Prefer snprintf() over sprintf().
...
Obtained from: WHEEL Systems
2012-12-16 22:59:25 +00:00
pjd
1d3ec906ca
- When checking if a dump exists on the given device there is no need to
...
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
2012-12-14 15:12:08 +00:00
pjd
ab75315eec
The clear option (-c) is not compatible with keep (-k) and compress (-z)
...
options.
Obtained from: WHEEL Systems
2012-12-14 15:04:39 +00:00
pjd
a555e48222
If we are not going to clear the dump (we are either just checking if the dump
...
exists or we want to keep it), open device read-only.
Obtained from: WHEEL Systems
2012-12-14 15:03:12 +00:00
pjd
389f3e3c15
Whitespace cleanups.
2012-12-14 15:01:23 +00:00
marcel
9dd41e3647
Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
...
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
rmh
210e5f7c82
Include <signal.h> (for SIGINFO).
2012-04-09 20:55:23 +00:00
kevlo
c1214139ee
Remove duplicated header files
2011-06-24 07:29:04 +00:00
joel
549927031e
Remove the advertising clause from UCB copyrighted files in sbin. This
...
is in accordance with the information at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
2010-12-12 21:26:12 +00:00
ru
763b9ae1f8
Switch the default WARNS level for sbin/ to 6.
...
Submitted by: Ulrich Spörlein
2009-10-19 16:00:24 +00:00
ru
8ad558ea8b
Fixed markup.
2009-09-17 19:15:49 +00:00
lulf
a0be63d7cb
- Add a SIGINFO handler for savecore.
2009-08-25 06:21:45 +00:00
brueffer
ecbce5102d
Correct the information about when the respective functionality first
...
appeared in FreeBSD.
PR: 133785
Submitted by: Ulrich Spoerlein <uqs@spoerlein.net>
MFC after: 3 days
2009-04-23 08:37:56 +00:00
trhodes
953a7479f3
Apply various fixes:
...
Silence mdoc(7) warnings;
Xref correct manual pages;
Point user to the ddb.8 manual page.
PR: 129398
Submitted by: gavin
2008-12-24 11:12:21 +00:00
rwatson
60c8c67e86
Compare kernel dump header magic with textdump magic using strncmp()
...
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
2007-12-27 21:28:48 +00:00
rwatson
63408299ff
Teach savecore(8) how to extract textdump(4) dumps.
...
Update savecore(8) man page to reflect textdump additions.
MFC after: 3 months
2007-12-26 11:42:10 +00:00
kevlo
7d4dfa7942
Check fdopen return value.
...
Reviewed by: phk
2007-05-28 09:48:25 +00:00
maxim
0433eb44c6
o Restore kerneldumpheader.architectureversion bytes swopping
...
mangled in rev. 1.72.
PR: bin/86805
Submitted by: Gavin Atkinson
MFC after: 3 days
2005-10-02 11:31:45 +00:00
rwatson
002afbbdf9
Don't consider being unable to open the bounds file worthy of printing
...
at LOG_WARNING by default; instead, consider it something to be printed
to the tty when 'verbose' mode is set. This avoids printing out extra
lines at every boot on a system with crash dumps enabled, but that has
not yet had to generate a crashdump.
MFC after: 1 week
2005-09-13 19:15:28 +00:00
dwhite
2ca7877009
Don't bump bounds every time savecore(8) is run.
...
Submitted by: Ed Maste <emaste@sandvine.com>
Approved by: re
2005-06-20 20:01:29 +00:00
ru
064bdbb814
Markup fixes.
...
Approved by: re (blanket)
2005-06-14 11:24:56 +00:00
philip
2828ecf11a
Fix a silly little typo I just spotted.
2005-06-06 06:47:33 +00:00
delphij
2163cbcb0f
Constify savedir pointer, and remove an accompaning strdup() call.
2005-05-29 16:28:07 +00:00
obrien
0214e187af
style(9).
2005-02-26 01:19:21 +00:00