Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst If a valid file system type is found f...
details: https://anonhg.NetBSD.org/src/rev/e6a4f6af9d6e
branches: trunk
changeset: 533414:e6a4f6af9d6e
user: scottr <scottr%NetBSD.org@localhost>
date: Sat Jun 29 20:12:57 2002 +0000
description:
If a valid file system type is found for a particular partition but no
mount point was specified, make sure to add only a commented-out entry for
that partition when building fstab. This prevents sysinst from generating
an otherwise invalid fstab. Bob Nestor found this while working on sysinst
for mac68k, and as such there is no corresponding PR.
diffstat:
distrib/utils/sysinst/disks.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diffs (57 lines):
diff -r b116227e1d22 -r e6a4f6af9d6e distrib/utils/sysinst/disks.c
--- a/distrib/utils/sysinst/disks.c Sat Jun 29 20:04:56 2002 +0000
+++ b/distrib/utils/sysinst/disks.c Sat Jun 29 20:12:57 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.41 2001/01/14 23:45:17 mrg Exp $ */
+/* $NetBSD: disks.c,v 1.42 2002/06/29 20:12:57 scottr Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -319,23 +319,31 @@
#endif
}
for (i = 0; i < getmaxpartitions(); i++)
- if (bsdlabel[i].pi_fstype == FS_BSDFFS)
- scripting_fprintf(f, "/dev/%s%c %s ffs rw 1 %d\n",
+ if (bsdlabel[i].pi_fstype == FS_BSDFFS) {
+ char *s = "#";
+
+ if (*fsmount[i] != '\0')
+ s++;
+ scripting_fprintf(f, "%s/dev/%s%c %s ffs rw 1 %d\n", s,
diskdev, 'a'+i, fsmount[i],
fsck_num(fsmount[i]));
- else if (bsdlabel[i].pi_fstype == FS_BSDLFS) {
+ } else if (bsdlabel[i].pi_fstype == FS_BSDLFS) {
char *s = "#";
/* If there is no LFS, just comment it out. */
- if (!check_lfs_progs())
+ if (!check_lfs_progs() && *fsmount[i] != '\0')
s++;
scripting_fprintf(f, "%s/dev/%s%c %s lfs rw 1 %d\n", s,
diskdev, 'a'+i, fsmount[i],
fsck_num(fsmount[i]));
- } else if (bsdlabel[i].pi_fstype == FS_MSDOS)
- scripting_fprintf(f, "/dev/%s%c %s msdos rw 0 0\n",
+ } else if (bsdlabel[i].pi_fstype == FS_MSDOS) {
+ char *s = "#";
+
+ if (*fsmount[i] != '\0')
+ s++;
+ scripting_fprintf(f, "%s/dev/%s%c %s msdos rw 0 0\n", s,
diskdev, 'a'+i, fsmount[i]);
- else if (bsdlabel[i].pi_fstype == FS_SWAP) {
+ } else if (bsdlabel[i].pi_fstype == FS_SWAP) {
if (swapdev == -1)
swapdev = i;
scripting_fprintf(f, "/dev/%s%c none swap sw 0 0\n", diskdev, 'a'+i);
@@ -363,7 +371,7 @@
{
static int num = 1;
- if (strcmp(mp, "/"))
+ if (strcmp(mp, "/") == 0)
return 1;
return (++num);
Home |
Main Index |
Thread Index |
Old Index