summaryrefslogtreecommitdiffstats
path: root/sbin/savecore
Commit message (Collapse)AuthorAgeFilesLines
...
* * Switch from doing compress(1)ed crashdumps with the -z flag to usingkris2001-09-063-40/+43
| | | | | | | | | | | gzip(1). gdb doesn't understand these, but then again it didn't understand compressed crashdumps either. * Change a stray lseek() into a Lseek() * Remove the extraneous prototype for log() which has apparently never existed in FreeBSD's sources Obtained from: NetBSD (partially) MFC after: 2 weeks
* Banish hard-coded KERNBASE references from savecore. Dynamicallypeter2001-08-241-1/+15
| | | | adjust to whatever kernbase is in the kernel that we are dumping.
* Silence non-constant format string warnings by marking functionskris2001-08-191-1/+1
| | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* dumpmag is 'u_long dumpmag' in the kernel, not 'int'. If this worked onpeter2001-06-091-4/+6
| | | | | | the Alpha, it was because of luck that it was little endian. Tidy up the dumpsize/dumppages confusion and the out of date comments.
* 'int dumpsize; /* memory size in bytes */' is not good for machinespeter2001-06-081-3/+5
| | | | with 2GB or more of ram.
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for sbin/ to 8.ru2001-03-201-1/+1
|
* Restore the -c option, which was accidentally removed from the getoptdes2001-03-061-1/+1
| | | | string two revisions ago.
* Document the new -k option in usage message and man page.des2001-02-162-2/+4
|
* Add a -k option that prevents clearing the dump after saving it.des2001-02-161-16/+57
| | | | | | | | | Use sysctlbyname() instead of sysctl(). Clear up and simplify the version extraction code. Attempt to detect stretches of zeroes in the dump and avoid writing them to disk to save space and time.
* Prepare for mdoc(7)NG.ru2001-01-161-2/+2
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* Work much harder at obtaining a correct device node. If what devname(3)des2000-10-171-31/+89
| | | | | | | | | | | | returns doesn't exist, or doesn't match the desired device, fall back to scanning /dev for a matching node, and as a last resort, if that fails, try to create the node ourselves as /dev/dump. Add comments to several variables and functions. Clean up syslog(3) usage; use %m instead of strerror(3). Other minor cleanup.
* Remove superfluous code:des2000-09-281-78/+29
| | | | | | | | | | | 1) use devname() instead of searching /dev for the dump device 2) use fopen() instead of open() so we don't need to differentiate between compressing and not compressing when writing the core file or the kernel (zopen() returns a FILE *, so we just use fwrite() in both cases) There should be no functional changes.
* I'm not sure what changed to cause this, but using 'dirname' as a variablepeter2000-09-031-8/+8
| | | | | was colliding with dirname() in libc.a and causing a Sig 10/bus error. Just change dirname to savedir and be done with it.
* Tidy up the offset calculations.ps2000-05-091-5/+4
| | | | Submitted by: bde
* Read the correct size into kdumplo.ps2000-05-091-1/+1
| | | | Botched/Noticed by: peter
* Allow savecore to work on > 2GB partitions.ps2000-05-081-2/+4
| | | | Submitted by: peter
* Fixed style bugs in rev.1.28. Rev.1.28 was not submitted by bde.bde2000-03-201-2/+3
|
* Only character devices exsist these days. Make savecore understandps2000-03-201-33/+8
| | | | this.
* Fix bogus initialization of using a sledge hammer to quite -Wall, badobrien1999-12-211-5/+4
| | | | | | indention, and size issue between 32 and 64bit machines. Submitted by: bde
* When erroring out that there is not enough space to write the corefile,obrien1999-12-081-3/+5
| | | | | tell the user how much space is avaible for writing the corefile, and how much space we wanted.
* Allow character devices tooache1999-11-301-5/+5
|
* Fix savecore so that it operates correctly on character devices withphk1999-08-311-27/+90
| | | | | | sectorsizes up to 8k. Pointed out by: sos
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Read dumpdev using sysctl(3) interface. Now savecore should work againluoqi1999-05-131-16/+22
| | | | after the dev_t changes.
* Fix savecore so that it works on alphasgallatin1999-03-121-1/+7
| | | | Reviewed by: Doug Rabson <dfr@nlsystems.com>
* Correct use of .Nm, add rcsid, remove unused #include.charnier1998-07-282-12/+15
|
* Fixed printf format errors.bde1998-06-281-1/+1
|
* Pickup _time_second instead of _timephk1998-03-301-2/+2
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix my yesterday's brain-o: don't account for the kilobytes twice.joerg1996-10-141-1/+1
|
* Yikes! Originally, i intended to apply the patch from PR # 1322,joerg1996-10-131-5/+6
| | | | | | | | | | | | | but Bill has beaten me on this. ;-) However, he missed the part to compute the kernelsize in kilobytes, so the minfree consideration was now overcautious. (I've also changed the return type of dump_size() to void since int was useless.) Being here, the fact that `vmcore' was written world-readable was just a plain security hole: everybody who was able to crash a kernel could later read any confidential information out of it at his will. Create it with umask 077 instead.
* Make the savecore command work like the man page says:fenner1996-10-132-10/+21
| | | | | | | | | | | | | - make minfree work by getting the dump size before checking to see if the dump will fit on the filesystem - also fail to dump if no minfree is specified but there are not enough free blocks. Fix a typo in the man page. Fixes PR bin/1322 Submitted by: "Philippe C." <charnier@lirmm.fr>
* Cast the partial result of an expression to an off_t to fix an overflowdg1996-09-051-1/+1
| | | | | | in the calculation of free disk space. Fixes PR#1569. Submitted by: Tor Egge <Tor.Egge@idt.ntnu.no>
* a header file for zopen.3wosch1996-08-202-1/+5
| | | | Pointed out by: Philippe Charnier <charnier@lirmm.fr>
* NBPG -> getpagesize()phk1996-05-021-1/+1
|
* Add #include <vm/pmap.h> in order to make savecore compile again after thepeter1995-12-131-0/+1
| | | | last round of <vm/*.h> include file changes.
* Delete bogus referneces to timezone code internal header file `tzfile.h',wollman1995-08-071-2/+1
| | | | which is no longer bogusly installed in /usr/include.
* Remove a newline from the output of savecore(8), so the bogus numberjoerg1995-07-301-1/+0
| | | | | | | | | 1024 that used to remain on a line of its own after savecore completed its job will be overwritten later in the /etc/rc process. Reviewed by: Submitted by: graichen@sirius.physik.fu-berlin.de (Thomas Graichen) Obtained from:
* Remove a bogus fclose. Normally the "w" stream for /var/crash/bounds wasbde1995-07-111-1/+0
| | | | | | fclosed twice and this didn't seem to cause any problems, but when /var/crash was on an an unwritable nfs-mounted partition, fclose(NULL) caused a core dump.
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* The -N option takes one argument, hence the getopt control stringjoerg1995-01-021-1/+1
| | | | | needs to have a colon for it. Looks like nobody has tested this so far.
* Get rid of _PATH_UNIX completely; use getbootfile(3) instead.wollman1994-09-242-21/+19
| | | | | | | DANGER WILL ROBINSON! _PATH_UNIX is currently defined as the literal string "don't use this". I am of two minds about this myself, but wanted to get something into the tree as quickly as possible.
* Converted 'vmunix' to 'kernel'.dg1994-08-052-22/+22
|
* Convert to our man installation style. Also fixed long-standing bugwollman1994-08-051-1/+1
| | | | | in `fastboot'/`fasthalt' in which the interpreter would hang around after `reboot' or `halt' is run, causing an irritating ``Killed'' message.
* I know better than to edit files on freefall, next time take a patch file.rgrimes1994-05-281-1/+1
| | | | Change vm_paramh. to vm_param.h
OpenPOWER on IntegriCloud