summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-11-04 02:04:36 +0000
committermarcel <marcel@FreeBSD.org>2003-11-04 02:04:36 +0000
commit91d97512540deddfc5ec16f4b25928801effe746 (patch)
tree9cc08de171144fc6f9e2437e6026185014b8a1ce /usr.sbin/sade
parent0faeaa0329941847146093c629ffbb4699e25686 (diff)
downloadFreeBSD-src-91d97512540deddfc5ec16f4b25928801effe746.zip
FreeBSD-src-91d97512540deddfc5ec16f4b25928801effe746.tar.gz
o Don't tell that there's such a thing as a C suffix for specifying
a partition size on ia64. It's not true. o Ask for a mountpoint for EFI partitions as well and check that it isn't "/". o On ia64 we may need to add EFI partitions. Make sure we pass the right arguments to Create_Chunk_DWIM() in that case.
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/label.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index f1ccad1..5b4a51c 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -999,7 +999,11 @@ diskLabel(Device *dev)
sprintf(osize, "%d", sz);
val = msgGetInput(osize,
"Please specify the partition size in blocks or append a trailing G for\n"
+#ifdef __ia64__
+ "gigabytes, M for megabytes.\n"
+#else
"gigabytes, M for megabytes, or C for cylinders.\n"
+#endif
"%d blocks (%dMB) are free.",
sz, sz / ONE_MEG);
if (!val || (size = strtol(val, &cp, 0)) <= 0) {
@@ -1029,14 +1033,21 @@ diskLabel(Device *dev)
break;
}
- if (type == PART_FILESYSTEM) {
+ if (type == PART_FILESYSTEM || type == PART_EFI) {
if ((p = get_mountpoint(NULL)) == NULL) {
clear_wins();
beep();
break;
}
- else if (!strcmp(p->mountpoint, "/"))
- flags |= CHUNK_IS_ROOT;
+ else if (!strcmp(p->mountpoint, "/")) {
+ if (type != PART_FILESYSTEM) {
+ clear_wins();
+ beep();
+ break;
+ }
+ else
+ flags |= CHUNK_IS_ROOT;
+ }
else
flags &= ~CHUNK_IS_ROOT;
}
@@ -1049,10 +1060,14 @@ diskLabel(Device *dev)
"partitions should usually be at least %dMB in size", ROOT_MIN_SIZE);
}
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c,
- size, part,
- (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS,
- flags);
+ label_chunk_info[here].c, size,
+#ifdef __ia64__
+ (type == PART_EFI) ? efi : part,
+ (type == PART_EFI) ? 0 : (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS,
+#else
+ part, (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS,
+#endif
+ flags);
if (!tmp) {
msgConfirm("Unable to create the partition. Too big?");
clear_wins();
OpenPOWER on IntegriCloud