summaryrefslogtreecommitdiffstats
path: root/sbin/savecore
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-05 09:14:37 +0000
committerdg <dg@FreeBSD.org>1994-08-05 09:14:37 +0000
commit6b466831f41965b3c04e37a06388e031c03316b6 (patch)
tree242b5d9154977fcfbc3e9f84dd0d6851c367a897 /sbin/savecore
parent57ea13e98c2c8a39a0a8fb034ee3cb0f3654d591 (diff)
downloadFreeBSD-src-6b466831f41965b3c04e37a06388e031c03316b6.zip
FreeBSD-src-6b466831f41965b3c04e37a06388e031c03316b6.tar.gz
Converted 'vmunix' to 'kernel'.
Diffstat (limited to 'sbin/savecore')
-rw-r--r--sbin/savecore/savecore.88
-rw-r--r--sbin/savecore/savecore.c36
2 files changed, 22 insertions, 22 deletions
diff --git a/sbin/savecore/savecore.8 b/sbin/savecore/savecore.8
index aabee53..3fca145 100644
--- a/sbin/savecore/savecore.8
+++ b/sbin/savecore/savecore.8
@@ -63,7 +63,7 @@ is insufficient disk space.
.It Fl N
Use
.Ar system
-as the kernel instead of the default ``/vmunix''.
+as the kernel instead of the default ``/kernel''.
.It Fl v
Prints out some additional debugging information.
.It Fl z
@@ -77,7 +77,7 @@ that it corresponds to the currently running system.
If it passes these checks, it saves the core image in
.Ar directory Ns Pa /vmcore.#
and the system in
-.Ar directory Ns Pa /vmunix.#
+.Ar directory Ns Pa /kernel.#
The ``#'' is the number from the first line of the file
.Ar directory Ns Pa /bounds ,
and it is incremented and stored back into the file each time
@@ -107,8 +107,8 @@ is meant to be called near the end of the initialization file
(see
.Xr rc 8 ) .
.Sh FILES
-.Bl -tag -width /vmunixxx -compact
-.It Pa /vmunix
+.Bl -tag -width /kernelxx -compact
+.It Pa /kernel
current
.Tn UNIX
.El
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index f9c106d..59e0ff5 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -99,7 +99,7 @@ long dumplo; /* where dump starts on dumpdev */
int dumpmag; /* magic number in dump */
int dumpsize; /* amount of memory dumped */
-char *vmunix;
+char *kernel;
char *dirname; /* directory to save dumps in */
char *ddname; /* name of dump device */
dev_t dumpdev; /* dump device */
@@ -150,7 +150,7 @@ main(argc, argv)
force = 1;
break;
case 'N':
- vmunix = optarg;
+ kernel = optarg;
break;
case 'z':
compress = 1;
@@ -168,7 +168,7 @@ main(argc, argv)
dirname = argv[0];
}
if (argc == 2)
- vmunix = argv[1];
+ kernel = argv[1];
(void)time(&now);
kmem_setup();
@@ -221,7 +221,7 @@ kmem_setup()
exit(1);
}
- dump_sys = vmunix ? vmunix : _PATH_UNIX;
+ dump_sys = kernel ? kernel : _PATH_UNIX;
if ((nlist(dump_sys, dump_nl)) == -1)
syslog(LOG_ERR, "%s: nlist: %s", dump_sys, strerror(errno));
for (i = 0; dumpsyms[i] != -1; i++)
@@ -253,7 +253,7 @@ kmem_setup()
syslog(LOG_ERR, "%s: fdopen: %m", _PATH_KMEM);
exit(1);
}
- if (vmunix)
+ if (kernel)
return;
(void)fseek(fp, (off_t)current_nl[X_VERSION].n_value, L_SET);
(void)fgets(vers, sizeof(vers), fp);
@@ -275,7 +275,7 @@ check_kmem()
}
fseek(fp, (off_t)(dumplo + ok(dump_nl[X_VERSION].n_value)), L_SET);
fgets(core_vers, sizeof(core_vers), fp);
- if (strcmp(vers, core_vers) && vmunix == 0)
+ if (strcmp(vers, core_vers) && kernel == 0)
syslog(LOG_WARNING,
"warning: %s version mismatch:\n\t%s\nand\t%s\n",
_PATH_UNIX, vers, core_vers);
@@ -413,8 +413,8 @@ err2: syslog(LOG_WARNING,
(void)close(ofd);
/* Copy the kernel. */
- ifd = Open(vmunix ? vmunix : _PATH_UNIX, O_RDONLY);
- (void)snprintf(path, sizeof(path), "%s/vmunix.%d%s",
+ ifd = Open(kernel ? kernel : _PATH_UNIX, O_RDONLY);
+ (void)snprintf(path, sizeof(path), "%s/kernel.%d%s",
dirname, bounds, compress ? ".Z" : "");
if (compress) {
if ((fp = zopen(path, "w", 0)) == NULL) {
@@ -434,15 +434,15 @@ err2: syslog(LOG_WARNING,
syslog(LOG_ERR, "%s: %s",
path, strerror(nw == 0 ? EIO : errno));
syslog(LOG_WARNING,
- "WARNING: vmunix may be incomplete");
+ "WARNING: kernel may be incomplete");
exit(1);
}
}
if (nr < 0) {
syslog(LOG_ERR, "%s: %s",
- vmunix ? vmunix : _PATH_UNIX, strerror(errno));
+ kernel ? kernel : _PATH_UNIX, strerror(errno));
syslog(LOG_WARNING,
- "WARNING: vmunix may be incomplete");
+ "WARNING: kernel may be incomplete");
exit(1);
}
if (compress)
@@ -532,18 +532,18 @@ int
check_space()
{
register FILE *fp;
- char *tvmunix;
- off_t minfree, spacefree, vmunixsize, needed;
+ char *tkernel;
+ off_t minfree, spacefree, kernelsize, needed;
struct stat st;
struct statfs fsbuf;
char buf[100], path[MAXPATHLEN];
- tvmunix = vmunix ? vmunix : _PATH_UNIX;
- if (stat(tvmunix, &st) < 0) {
- syslog(LOG_ERR, "%s: %m", tvmunix);
+ tkernel = kernel ? kernel : _PATH_UNIX;
+ if (stat(tkernel, &st) < 0) {
+ syslog(LOG_ERR, "%s: %m", tkernel);
exit(1);
}
- vmunixsize = st.st_blocks * S_BLKSIZE;
+ kernelsize = st.st_blocks * S_BLKSIZE;
if (statfs(dirname, &fsbuf) < 0) {
syslog(LOG_ERR, "%s: %m", dirname);
exit(1);
@@ -561,7 +561,7 @@ check_space()
(void)fclose(fp);
}
- needed = (dumpsize + vmunixsize) / 1024;
+ needed = (dumpsize + kernelsize) / 1024;
if (minfree > 0 && spacefree - needed < minfree) {
syslog(LOG_WARNING,
"no dump, not enough free space on device");
OpenPOWER on IntegriCloud