summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/devices.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-08 01:27:07 +0000
committerjkh <jkh@FreeBSD.org>1995-05-08 01:27:07 +0000
commitf8629aa1a33b98ba8309724421c3db385b2e9f98 (patch)
tree017d3f8e02399c22aba005496ea7dd3a2f27c2ea /usr.sbin/sysinstall/devices.c
parentdd5b13ab4bedcee82a6b8eb428417e7c75dba703 (diff)
downloadFreeBSD-src-f8629aa1a33b98ba8309724421c3db385b2e9f98.zip
FreeBSD-src-f8629aa1a33b98ba8309724421c3db385b2e9f98.tar.gz
Implement the geometry command. Clean up the help a little.
Diffstat (limited to 'usr.sbin/sysinstall/devices.c')
-rw-r--r--usr.sbin/sysinstall/devices.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c
index 94cd4bf..1b45290 100644
--- a/usr.sbin/sysinstall/devices.c
+++ b/usr.sbin/sysinstall/devices.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: devices.c,v 1.8 1995/05/07 05:58:55 jkh Exp $
+ * $Id: devices.c,v 1.9 1995/05/07 22:07:50 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -239,8 +239,19 @@ device_slice_disk(struct disk *d)
}
break;
- case 'G':
- /* Set geometry */
+ case 'G': {
+ char *val, geometry[80];
+
+ snprintf(geometry, 80, "%lu/%lu/%lu",
+ d->bios_cyl, d->bios_hd, d->bios_sect);
+ val = msgGetInput(geometry,
+"Please specify the new geometry in cyl/hd/sect format.\nDon't forget to use the two slash (/) separator characters!\nIt's not possible to parse the field without them.");
+ if (val) {
+ d->bios_cyl = strtol(val, &val, 0);
+ d->bios_hd = strtol(val + 1, &val, 0);
+ d->bios_sect = strtol(val + 1, 0, 0);
+ }
+ }
break;
case 'S':
OpenPOWER on IntegriCloud