Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst When creating /etc/fstab:
details: https://anonhg.NetBSD.org/src/rev/fc50c6a90d4b
branches: trunk
changeset: 747853:fc50c6a90d4b
user: martin <martin%NetBSD.org@localhost>
date: Sat Oct 03 12:00:00 2009 +0000
description:
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.
diffstat:
distrib/utils/sysinst/disks.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r edc90c727cc6 -r fc50c6a90d4b distrib/utils/sysinst/disks.c
--- a/distrib/utils/sysinst/disks.c Sat Oct 03 07:37:01 2009 +0000
+++ b/distrib/utils/sysinst/disks.c Sat Oct 03 12:00:00 2009 +0000
@@ -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:
Home |
Main Index |
Thread Index |
Old Index