From 5e7d9e89bac48acf5013c5c346c1b75c4abbca2d Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Fri, 12 May 1995 19:12:44 +0000 Subject: [PATCH] Don't automatically default dumps to be on a swap device; if the user wants dumps, he can either configure it explicitly (`dumps on' whatever) or use the dumpon(8) utility. --- usr.sbin/config/config.y | 7 ++----- usr.sbin/config/mkswapconf.c | 10 +++++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 76e9a50bc16d..fb3ede0b8f24 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -1033,12 +1033,9 @@ checksystemspec(fl) return; } /* - * Default dump device and warn if place is not a - * swap area. + * Warn if dump device is not a swap area. */ - if (fl->f_dumpdev == NODEV) - fl->f_dumpdev = swap->f_swapdev; - if (fl->f_dumpdev != swap->f_swapdev) { + if (fl->f_dumpdev != NODEV && fl->f_dumpdev != swap->f_swapdev) { struct file_list *p = swap->f_next; for (; p && p->f_type == SWAPSPEC; p = p->f_next) diff --git a/usr.sbin/config/mkswapconf.c b/usr.sbin/config/mkswapconf.c index cbb97c75e529..002d85ef1854 100644 --- a/usr.sbin/config/mkswapconf.c +++ b/usr.sbin/config/mkswapconf.c @@ -97,9 +97,13 @@ do_swap(fl) fprintf(fp, "dev_t\trootdev = makedev(%d, 0x%08x);\t\t/* %s */\n", major(fl->f_rootdev), minor(fl->f_rootdev), devtoname(fl->f_rootdev)); - fprintf(fp, "dev_t\tdumpdev = makedev(%d, 0x%08x);\t\t/* %s */\n", - major(fl->f_dumpdev), minor(fl->f_dumpdev), - devtoname(fl->f_dumpdev)); + if (fl->f_dumpdev != NODEV) { + fprintf(fp, "dev_t\tdumpdev = makedev(%d, 0x%08x);\t\t/* %s */\n", + major(fl->f_dumpdev), minor(fl->f_dumpdev), + devtoname(fl->f_dumpdev)); + } else { + fprintf(fp, "dev_t\tdumpdev = NODEV;\t\t\t/* unconfigured */\n"); + } fprintf(fp, "\n"); fprintf(fp, "struct\tswdevt swdevt[] = {\n"); do {