summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/disks.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-07 23:37:34 +0000
committerjkh <jkh@FreeBSD.org>1995-05-07 23:37:34 +0000
commit01c872638ff0b1ecd62eb5b6f8af71dfd05ae205 (patch)
tree593222abd07587a9e7c14c8a8b715068dcd3757b /usr.sbin/sysinstall/disks.c
parent8a8b9e96e60149210d03a8c01f441f6db78607e3 (diff)
downloadFreeBSD-src-01c872638ff0b1ecd62eb5b6f8af71dfd05ae205.zip
FreeBSD-src-01c872638ff0b1ecd62eb5b6f8af71dfd05ae205.tar.gz
Another sync up for Poul. Added a lot more error checking.
Diffstat (limited to 'usr.sbin/sysinstall/disks.c')
-rw-r--r--usr.sbin/sysinstall/disks.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index b499532..9339a8d 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.6 1995/05/07 05:58:56 jkh Exp $
+ * $Id: disks.c,v 1.7 1995/05/07 22:07:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -198,6 +198,7 @@ new_part(char *mpoint, Boolean newfs)
ret = (PartInfo *)safe_malloc(sizeof(PartInfo));
strncpy(ret->mountpoint, mpoint, FILENAME_MAX);
+ strcpy(ret->newfs_cmd, "newfs");
ret->newfs = newfs;
return ret;
}
@@ -258,6 +259,18 @@ get_partition_type(void)
return PART_NONE;
}
+static void
+getNewfsCmd(PartInfo *p)
+{
+ char *val;
+
+ val = msgGetInput(p->newfs_cmd,
+ "Please enter the newfs command and options you'd like to use in\ncreating this file system.");
+ if (val)
+ strncpy(p->newfs_cmd, val, NEWFS_CMD_MAX);
+}
+
+
#define MAX_MOUNT_NAME 12
#define PART_PART_COL 0
@@ -322,8 +335,10 @@ print_fbsd_chunks(void)
memset(onestr, ' ', PART_OFF - 1);
onestr[PART_OFF - 1] = '\0';
/* Go for two columns */
- if (prow == (CHUNK_PART_START_ROW + CHUNK_COLUMN_MAX))
+ if (prow == (CHUNK_PART_START_ROW + CHUNK_COLUMN_MAX)) {
pcol = PART_OFF;
+ prow = CHUNK_PART_START_ROW;
+ }
else
pcol = 0;
memcpy(onestr + PART_PART_COL, fbsd_chunk_info[i].c->name,
@@ -517,9 +532,29 @@ partition_disks(struct disk **disks)
}
break;
+ case 'N': /* Set newfs options */
+ if (fbsd_chunk_info[current_chunk].c->private &&
+ ((PartInfo *)fbsd_chunk_info[current_chunk].c->private)->newfs)
+ getNewfsCmd(fbsd_chunk_info[current_chunk].c->private);
+ else
+ msg = "newfs options not applicable for this partition";
+ break;
+
+ case 'T': /* Toggle newfs state */
+ if (fbsd_chunk_info[current_chunk].c->private)
+ ((PartInfo *)fbsd_chunk_info[current_chunk].c->private)->newfs = !((PartInfo *)fbsd_chunk_info[current_chunk].c->private)->newfs;
+ else
+ msg = "Set a mount point first.";
+ break;
+
case 27: /* ESC */
partitioning = FALSE;
break;
+
+ default:
+ beep();
+ msg = "Type F1 or ? for help";
+ break;
}
}
}
OpenPOWER on IntegriCloud