summaryrefslogtreecommitdiffstats
path: root/sbin/savecore
Commit message (Collapse)AuthorAgeFilesLines
* Don't bump bounds every time savecore(8) is run.dwhite2005-06-201-9/+12
| | | | | Submitted by: Ed Maste <emaste@sandvine.com> Approved by: re
* Markup fixes.ru2005-06-141-1/+1
| | | | Approved by: re (blanket)
* Fix a silly little typo I just spotted.philip2005-06-061-1/+1
|
* Constify savedir pointer, and remove an accompaning strdup() call.delphij2005-05-291-8/+3
|
* style(9).obrien2005-02-261-43/+45
|
* Allow a forced dump even if the dump header information is inconsistent.obrien2005-02-242-18/+61
| | | | | | Output more verbosity with additional -v's. Submitted by: seanc
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-101-2/+4
|
* Sort sections.ru2005-01-181-2/+2
|
* Initialize "he" in DoFile, so savecore(8) is WARNS=6 clean.delphij2005-01-102-2/+2
| | | | Bump WARNS accordingly.
* Use a local "compress" symbol corresponding to a variable in BSS,ru2004-08-161-2/+2
| | | | | | | rather than the one from libz, corresponding to a function, when linking statically. PR: bin/70392
* Remove advertising clause from University of California Regent's license,markm2004-04-091-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* o Remove obsoleted '-N' and '-d' flags.maxim2004-02-281-3/+1
|
* o Sync usage() with reality: add 'z' flag.maxim2004-02-281-1/+2
| | | | MFC after: 1 week
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* Merge from RELENG_4 1.28.2.13: Fix saving system crash dumps larger thantjr2004-02-201-1/+1
| | | | 2 GB by using fseeko() instead of fseek().
* Revision 1.61 changed the allocation of buffer 'buf' in DoFile() frommarcel2003-10-081-6/+0
| | | | | | | | | | | | | the stack to the heap to work around a problem on ia64. Now, roughly 16 months and two compiler updates later, it isn't an issue anymore in the sense that putting a 1M buffer on the stack just works and we don't actually need to work around anything anymore. However, since there's no advantage or need to put the buffer on the stack (again), this change merely removes the XXX comment describing that there's an explicit reason for the heap allocation. Hence, this change is a functional no-op. PR: ia64/38677
* Add a flag that reports the existence of a dump, and does nothing else.dougb2003-09-042-4/+32
| | | | | | | | The immediate purpose for this option is to use it in rc.d so that we can make savecore behavior conditional. Tremendous assistance with ideas and sanity checking provided by tjr and b@etek.chalmers.se.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-211-2/+2
|
* The .Nm utility.charnier2002-07-061-1/+1
|
* Fix breakage caused by allocating the I/O buffer. There was amarcel2002-06-021-2/+5
| | | | | | | sizeof(buf) lurking around that I missed. PR: 38811 Submitted by: Adrian Colley <aecolley@spamcop.net>
* mdoc(7) police: nits.ru2002-05-291-8/+21
|
* Work around a memory fault on ia64 caused by having the 1MB buffer onmarcel2002-05-271-1/+16
| | | | | the stack in DoFile(). This needs some investigation. In the mean time we do a one time malloc() for the buffer to have it on the heap instead.
* Style.ru2002-05-131-3/+4
|
* Make argument to printf match format.marcel2002-05-061-1/+1
|
* - revert back to vmcore.#fenner2002-05-053-109/+271
| | | | | | | | | | | | | | - reimplement -z - use syslog() - improve consistancy of messages - allow -f to recover cleared dumps - return bufsize to 1024 * 1024 - return the ability to write sparse files - update man page - fix minfree to require 2k for info file instead of the kernel size - include Berkeley copyright too due to amount of old code copied Submitted by: Chad David <davidc@acns.ab.ca>
* Restore the minfree functionality into savecore. This patchmux2002-05-041-7/+80
| | | | | | | | restores the check_space() function with small modifications to make it work with the current code. The patch was slightly modified by Bill Fenner to handle error messages better. Reviewed by: fenner
* Add FBSDID. Start errx(3) messages with lowercase. Remove a ')' with no '('.charnier2002-04-211-14/+15
| | | | | | In usage(), use fprintf(3) instead of errx(3), to make the printed string really start with `usage: ...'. Reviewed by: marcel
* Push the .info file contents out when we're done so people canphk2002-04-191-0/+1
| | | | read the description while the megs shift from one place to another.
* High-level changes (user visible):marcel2002-04-131-56/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | o Implement -c (clear) to clear previously kept headers (note that dumps not cleared will remain until -c is used), o Implement -f (force) to allow re-saving a previously saved dump, o Implement -k (keep) and make clearing the dump header the default, o Implement -v (verbose) and make most output conditional upon it, o Emit minimal output for the non-verbose case with the assumption that savecore is run mostly from within /etc/rc, o Update usage message to reflect what is and what's not, o mark -d as obsolete. Low-level changes: o Rename devname to device, for devname mirrors a global declaration and GCC 3.x warns about it, o Open the dump device R/W for clear and !keep to work, o Reorder the locals of DoFile according to style(9), o Remove newlines from strings passed to warn* and err*, o Use stat(2) to check if a dump has been saved before, o Truncate existing core and info files to support force, o First check for the magic and the version before we complain about parity errors. This prevents emitting parity error messages when there's no dump, o Keep track of the number of headers found and the number of headers saved to support the minimal output, o Close files we opened in DoFile. Not critical, but cleaner.
* Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.phk2002-04-081-1/+1
| | | | Sponsored by: DARPA & NAI Labs
* Make the kernel dump header endianness invariant by always dumpingmarcel2002-04-031-11/+15
| | | | | | | | | in dump byte order (=network byte order). Swap blocksize and dumptime to avoid extraneous padding on 64-bit architectures. Use CTASSERT instead of runtime checks to make sure the header is 512 bytes large. Various style(9) fixes. Reviewed by: phk, bde, mike
* Add long long casts so that this compiles on archs with 64-bit longs.jhb2002-04-011-4/+4
| | | | Pointy-hat to: phk
* Duh, savecore is called savecore.phk2002-04-011-1/+1
|
* Savecore:phk2002-03-312-754/+177
| | | | | | | | | | Commandline compatible with the previous savecore unless you specify any options, none of them are implemented (yet). Scans all devices marked "dump" or "swap" for dump header signatures and saves dumps off under a name which is a MD5 hash of the header information. This should give unique filenames. A *.info file contains ascii version of the header information.
* o remove __Pimp2002-03-211-16/+16
| | | | o remove main prototype
* Remove 'register' keyword.obrien2002-03-201-5/+5
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Sparc64 support.des2002-03-111-7/+7
|
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* Add a Xref to dumpon.n_hibma2001-10-281-0/+1
|
* Remove some bogus "(off_t)(dumplo + value)" and "(off_t)dumplo" casts,peter2001-10-051-16/+18
| | | | | since dumplo is now an off_t. Scratch a couple of other itches as well. s/L_SET/SEEK_SET/
* Argh. Fix another >2GB savecore problem.peter2001-10-051-1/+1
| | | | Reported by: mki@mozone.net
* fix savecore so that it works on the alpha after the size changegallatin2001-09-131-2/+2
| | | | | | | | | | of dumpmag from an int to a u_long in rev 1.41 -- without this change, savecore will always fail like this: #savecore -v /var/crash dumplo = 874356736 (1707728 * 512) savecore: magic number mismatch (8fca0101 != 8fca0101) savecore: no core dump
* mdoc(7) police: restore the correct sorting of SEE ALSO.ru2001-09-111-1/+1
|
* * 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.
OpenPOWER on IntegriCloud