thorpej
764e56a614
Remove prototype for non-existent function log().
2002-12-06 02:20:00 +00:00
drochner
335fd2d7c2
use humanize_number(3) for progress printout
2002-09-27 18:38:53 +00:00
christos
94d01e0c5d
PR/15502: Wolfgang Rupprecht: savecore fails for > 2GB files.
2002-03-19 18:55:03 +00:00
tsutsui
07b8153219
Change type of dumpmag and newdumpmag from int to u_int32_t
...
since they hold 32bit unsigned magic numbers. (sync with kernels)
2002-03-06 13:13:08 +00:00
lukem
d3656d428d
fix a couple of -Wshadow warnings
2001-11-01 07:39:38 +00:00
lukem
fa5157d9fb
explicitly set the default compression level to 1 (from the implicit 6),
...
because it's significantly faster and doesn't use that much more disk space.
2001-09-12 03:14:08 +00:00
lukem
fd08f59ac0
Add "-Z level" to control the compression level that -z uses (which
...
defaults to -Z 6). Depending on the relative speed of the CPU
versus disk, "-zZ1" might be faster than no compression at all.
2001-09-12 02:58:29 +00:00
wiz
f91f11f51f
Use getbootfile(3) instead of _PATH_UNIX by default.
...
Sprinkle some const.
2001-06-13 23:16:27 +00:00
simonb
1547b056d0
If the position of the formatted panic string can be found in the
...
message buffer, use that instead of the raw panic string.
Suggested by Jason Thorpe eons ago.
2001-05-06 13:36:51 +00:00
martin
1bb8e47f65
Make option flag variables static. This avoids a conflict between
...
'int compress' in savecore.c and the function 'compress' in libz.
Gnu ld 2.10 (with BFD 2.10) used on sparc64 warns this conflict
(symbol "compress" changed size).
2001-01-11 20:27:12 +00:00
joda
7e74657e37
use gzip instead of compress
2001-01-02 21:39:37 +00:00
lukem
834e92eedc
Bump the field width of `K to go' from 6 to 8; some systems have more
...
than 999999 KB of RAM... (this will suffice until it's common to have
~ 100 GB of RAM :)
2001-01-02 00:29:37 +00:00
wiz
9bf97e8322
Back out sysctl part for now, awaiting the result of further discussion,
...
on request of Andrew Doran.
2000-12-11 14:33:51 +00:00
wiz
4c06e7a434
Output proper warning if dumplo == -1 (as it can happen on macppc without
...
swap partition), instead of "kvm_dump_mkheader: Pread: Invalid argument".
2000-12-08 22:03:23 +00:00
wiz
ba968ca2e4
de-__P(), and generally try to be more conforming to the new NetBSD style.
...
Use %m in syslog strings where appropriate.
Reduce warnings with WARNS=2.
2000-12-07 03:55:44 +00:00
wiz
e7fe5f1380
Fix argument handling, which was pretty broken.
...
If sysctl supports it, try to get the kernel name with CPU_BOOTED_KERNEL.
Get current kernels version string in all cases.
Adapt some error messages to the correct kernel name.
Reviewed by Simon Burge.
2000-12-07 03:17:17 +00:00
darrenr
a2d10b89c2
initialize kernel to _PATH_UNIX and remove local variables in functions
...
which are essentially copies of kernel.
2000-10-08 07:04:28 +00:00
darrenr
3904e69e83
savecore was looking up dumpdev, etc, from the wrong kernel
2000-10-01 02:27:06 +00:00
eeh
baf03fd97c
time is a `struct timeval' not a `time_t', so read it in properly.
2000-08-01 16:46:27 +00:00
mycroft
c71139914f
s/on device/in [dirname]/, to be a bit clearer...
1999-08-02 00:33:01 +00:00
cgd
fb88e47b54
Remove an extraneous fclose() call which would cause savecore to crash
...
if the bounds file was unwritable (e.g. because /var was read-only).
Fix supplied by Ronald Khoo in PR#7887.
1999-07-01 08:53:35 +00:00
sommerfe
c805ae93c2
Crash dumps should *not* be world readable.
1999-02-27 20:40:30 +00:00
sommerfe
247b8c3e8c
Avoid truncating partition size in freespace calculation
1998-07-23 19:05:59 +00:00
kleink
13f28a764f
Need <time.h> for time() and ctime() prototypes.
1998-04-01 15:15:58 +00:00
thorpej
fc1ea31c1f
Avoid
1998-02-18 01:24:08 +00:00
lukem
df57ac7d4f
resolve conflicts from lite-2 merge
1997-09-16 14:19:03 +00:00
mrg
52ff5d8fee
make these compile on the alpha after WARNS=1.
1997-09-16 08:37:01 +00:00
lukem
beb7c8b582
* cleanup for WARNS=1
...
* fix .Nm usage
* deprecate register
1997-09-15 11:08:44 +00:00
kleink
66105c37fc
Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
...
use SEEK_SET/SEEK_CUR/SEEK_END instead.
1997-08-25 19:31:43 +00:00
pk
cceeb9e424
More error checking.
1997-05-19 16:28:03 +00:00
mrg
9d52d80cd8
set umask for savecore.
1997-04-21 12:50:43 +00:00
cgd
0b10619181
make datas item copied out from kernel (panicstr) and/or used as kvm pointers
...
(panicloc) be 'long's, not 'int's.
1996-10-01 18:21:48 +00:00
leo
4982d25253
If kvm_dump_mkheader() returns 0, simply state 'no core dump' instead
...
of logging and error.
1996-06-23 20:30:39 +00:00
leo
08b137da1d
Omit kd_live argument to kvm_dump_mkheader().
1996-03-18 21:16:05 +00:00
leo
a10137a7e3
New libkvm/savecore implementation. With the following differences:
...
1) savecore will not access the dump or live-kernel directly. It
will always use the kvm-functions. Allowing it to work on kernels
that don't have a 1-1 PA-VA mapping.
2) the kvm-lib has some additional functions to accomplish 1
- kvm_dump_mkheader()
- kvm_dump_wrtheader()
- kvm_dump_inval()
3) the file formats of the dump generated by the kernel and the dump
generated by savecore have been changed. The file format now looks
like the format produced for 'normal' core dumps.
Ports not yet supporting the new kvm-format will be using libkvm.old/
savecore.old for the time being.
1996-03-16 10:29:36 +00:00
mycroft
aca94000ae
Put the compression suffix *last*.
1996-03-08 08:52:12 +00:00
cgd
83b019efaa
set dumpsize in dump_exists(), not save_core(), so that minfree check
...
works again. solves pr 1257, but sets dumpsize earlier than suggested
in that pr, so that dumpsize is set if a core doesn't appear to be
present (because dumpsize would be used if the '-f' flag is given).
1995-07-24 20:35:02 +00:00
cgd
1ce78f01c4
fix verbose printf of dumplo, clean up printfs slightly
1995-06-25 06:28:13 +00:00
cgd
0114e805ce
convert to new RCS Id conventions; reduce my headache
1995-03-18 14:54:19 +00:00
mycroft
5099dbad93
Fix getopt string and test on return value.
1995-01-04 05:30:07 +00:00
cgd
12e31a0cfc
oops; get rid of previous (iffy) zopen declaration
1994-10-31 04:47:26 +00:00
cgd
6935d116b0
make a proto for zopen (yech)
1994-10-31 04:37:32 +00:00
mycroft
ea7b5d4ec6
Eliminate uses of some obsolete functions.
1994-09-23 14:26:58 +00:00
deraadt
a17fd8ea43
prototype zopen()
...
NBPG --> getpagesize()
1994-09-18 03:40:44 +00:00
mycroft
24a739f276
vmunix --> kernel (for variable names), and make the core file naming
...
convention match that of other executables.
1994-09-17 00:23:00 +00:00
mycroft
c250a07889
Fix up RCS ids.
1994-06-11 07:50:42 +00:00
pk
86fbbf6633
Update to 4.4-lite, local changes to man page.
1994-06-10 13:35:24 +00:00
pk
c3a3100892
Initialize return value from save_core() in case dumpsize == 0.
1994-05-31 09:38:12 +00:00
pk
327bccb71b
Don't clear dump if writing it to the filesystem fails (eg. file system full)
1994-05-27 08:40:49 +00:00
cgd
896fc34ba3
queue/struct changes
1994-04-21 07:58:49 +00:00