Module Name:    src
Committed By:   snj
Date:           Sat Jan  9 01:31:57 UTC 2010

Modified Files:
        src/distrib/utils/sysinst [netbsd-5]: disks.c

Log Message:
Pull up following revision(s) (requested by cegger in ticket #1217):
        distrib/utils/sysinst/disks.c: revision 1.108
When creating /etc/fstab:
for the first swap partition use type sw,dp instead of sw, so dump device
gets configured correctly if swap is not on the second partition.
Fixes PR install/42148.


To generate a diff of this commit:
cvs rdiff -u -r1.100.2.5 -r1.100.2.6 src/distrib/utils/sysinst/disks.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/sysinst/disks.c
diff -u src/distrib/utils/sysinst/disks.c:1.100.2.5 src/distrib/utils/sysinst/disks.c:1.100.2.6
--- src/distrib/utils/sysinst/disks.c:1.100.2.5	Sat Oct  3 23:22:23 2009
+++ src/distrib/utils/sysinst/disks.c	Sat Jan  9 01:31:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.100.2.5 2009/10/03 23:22:23 snj Exp $ */
+/*	$NetBSD: disks.c,v 1.100.2.6 2010/01/09 01:31:57 snj Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -652,6 +652,7 @@
 {
 	FILE *f;
 	int i, swap_dev = -1;
+	const char *dump_dev;
 
 	/* Create the fstab. */
 	make_target_dir("/etc");
@@ -707,10 +708,14 @@
 			fstype = "msdos";
 			break;
 		case FS_SWAP:
-			if (swap_dev == -1)
+			if (swap_dev == -1) {
 				swap_dev = i;
-			scripting_fprintf(f, "/dev/%s%c\t\tnone\tswap\tsw\t\t 0 0\n",
-				diskdev, 'a' + i);
+				dump_dev = ",dp";
+			} else {
+				dump_dev ="";
+			}
+			scripting_fprintf(f, "/dev/%s%c\t\tnone\tswap\tsw%s\t\t 0 0\n",
+				diskdev, 'a' + i, dump_dev);
 			continue;
 #ifdef USE_SYSVBFS
 		case FS_SYSVBFS:

Reply via email to