summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-04-11 23:57:57 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-04-11 23:57:57 +0000
commit0e41e97f9b074560ad86a21e01248507ea1cd528 (patch)
tree7800e8d6dcc63c0a065dae8c9d42f6ccf9e3a22e
parent5ea5c26336c06656aaae78699bf850f6b53cbd57 (diff)
Always display any mountpoint info available. Thus a simple -A will
now show the planned mountpoint layout. ok deraadt@
-rw-r--r--sbin/disklabel/disklabel.c10
-rw-r--r--sbin/disklabel/editor.c15
2 files changed, 10 insertions, 15 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 0ceefa749ae..6561885b78b 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.149 2009/04/11 16:54:28 krw Exp $ */
+/* $OpenBSD: disklabel.c,v 1.150 2009/04/11 23:57:56 krw Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -39,7 +39,7 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.149 2009/04/11 16:54:28 krw Exp $";
+static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.150 2009/04/11 23:57:56 krw Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -949,10 +949,8 @@ display_partition(FILE *f, struct disklabel *lp, int i, char unit)
break;
}
- if (fstabfile) {
- if (mountpoints[i] != NULL)
- fprintf(f, "# %s", mountpoints[i]);
- }
+ if (mountpoints[i] != NULL)
+ fprintf(f, "# %s", mountpoints[i]);
putc('\n', f);
}
}
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 02378a6ece1..48fbc431569 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.189 2009/04/11 15:17:11 krw Exp $ */
+/* $OpenBSD: editor.c,v 1.190 2009/04/11 23:57:56 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.189 2009/04/11 15:17:11 krw Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.190 2009/04/11 23:57:56 krw Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -501,8 +501,7 @@ editor_allocspace(struct disklabel *lp)
if (j == MAXPARTITIONS)
return;
pp = &lp->d_partitions[j];
- if (fstabfile)
- partmp = &mountpoints[j];
+ partmp = &mountpoints[j];
ap = &alloc[i];
/* Figure out the size of the partition. */
@@ -568,11 +567,9 @@ editor_allocspace(struct disklabel *lp)
pp->p_fstype = FS_SWAP;
else {
pp->p_fstype = FS_BSDFFS;
- if (fstabfile) {
- free(*partmp);
- if ((*partmp = strdup(ap->mp)) == NULL)
- errx(4, "out of memory");
- }
+ free(*partmp);
+ if ((*partmp = strdup(ap->mp)) == NULL)
+ errx(4, "out of memory");
}
}