summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-11-01 20:14:06 +0000
committermarcel <marcel@FreeBSD.org>2003-11-01 20:14:06 +0000
commitce9c4508530b8fdf80edb91f25ca954f0322b3ef (patch)
tree700a1c37ece0c19f48aebf002e1fd5261f9b4477 /usr.sbin/sade
parent854157714e80e85a7a547409638dbf5c15a5f15b (diff)
downloadFreeBSD-src-ce9c4508530b8fdf80edb91f25ca954f0322b3ef.zip
FreeBSD-src-ce9c4508530b8fdf80edb91f25ca954f0322b3ef.tar.gz
o Compile-out "wizard" mode on ia64.
o Also allow swap and filesystem partitions outside a freebsd slice. This is typically the case for GPT. o Allow chunks of type "whole" to be displayed at the top. This is to allow a GPT disk to be labeled. We need a slice out of which we can make partitions, but a GPT disk doesn't have slices. For GPT disks a chunk of type "whole" can then be used as a placeholder.
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/label.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index bf97140..8003d64 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -310,6 +310,16 @@ record_label_chunks(Device **devs, Device *dev)
label_chunk_info[j].c = c1;
++j;
}
+#ifdef __ia64__
+ else if (c1->type == part) {
+ if (c1->subtype == FS_SWAP)
+ label_chunk_info[j].type = PART_SWAP;
+ else
+ label_chunk_info[j].type = PART_FILESYSTEM;
+ label_chunk_info[j].c = c1;
+ ++j;
+ }
+#endif
}
}
label_chunk_info[j].c = NULL;
@@ -545,7 +555,7 @@ print_label_chunks(void)
++pslice_count;
}
pslice_max = pslice_count;
-
+
/*** 4 line max for partition slices ***/
if (pslice_max > PSLICE_SHOWABLE) {
pslice_max = PSLICE_SHOWABLE;
@@ -615,18 +625,29 @@ print_label_chunks(void)
if (i == pslice_focus)
pslice_focus_found = -1;
- if (sz >= 100 * ONE_GIG)
+ if (label_chunk_info[i].c->type == whole) {
+ if (sz >= 100 * ONE_GIG)
+ mvprintw(srow++, 0,
+ "Disk: %s\t\tFree: %d blocks (%dGB)",
+ label_chunk_info[i].c->disk->name, sz, (sz / ONE_GIG));
+ else
+ mvprintw(srow++, 0,
+ "Disk: %s\t\tFree: %d blocks (%dMB)",
+ label_chunk_info[i].c->disk->name, sz, (sz / ONE_MEG));
+ } else {
+ if (sz >= 100 * ONE_GIG)
mvprintw(srow++, 0,
"Disk: %s\tPartition name: %s\tFree: %d blocks (%dGB)",
label_chunk_info[i].c->disk->name,
label_chunk_info[i].c->name,
sz, (sz / ONE_GIG));
- else
+ else
mvprintw(srow++, 0,
"Disk: %s\tPartition name: %s\tFree: %d blocks (%dMB)",
label_chunk_info[i].c->disk->name,
label_chunk_info[i].c->name,
sz, (sz / ONE_MEG));
+ }
attrset(A_NORMAL);
clrtoeol();
move(0, 0);
@@ -1239,7 +1260,7 @@ diskLabel(Device *dev)
clear_wins();
break;
-
+#ifndef __ia64__
case '|':
if (!msgNoYes("Are you sure you want to go into Wizard mode?\n\n"
"This is an entirely undocumented feature which you are not\n"
@@ -1268,6 +1289,7 @@ diskLabel(Device *dev)
else
msg = "A most prudent choice!";
break;
+#endif
case '\033': /* ESC */
case 'Q':
OpenPOWER on IntegriCloud