Module Name: src
Committed By: martin
Date: Sat Oct 3 12:00:00 UTC 2009
Modified Files:
src/distrib/utils/sysinst: disks.c
Log Message:
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.107 -r1.108 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.107 src/distrib/utils/sysinst/disks.c:1.108
--- src/distrib/utils/sysinst/disks.c:1.107 Thu Oct 1 10:41:03 2009
+++ src/distrib/utils/sysinst/disks.c Sat Oct 3 12:00:00 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.107 2009/10/01 10:41:03 jmcneill Exp $ */
+/* $NetBSD: disks.c,v 1.108 2009/10/03 12:00:00 martin 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: