summaryrefslogtreecommitdiffstats
path: root/src/parti386.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-08-25 23:15:17 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-08-25 23:15:17 +0200
commitd5d0a9a74f20ab8288f81ec96be48636dd6e0686 (patch)
treed9ca34d754825448472b3670afaef7a8d43f38e6 /src/parti386.c
parentc943ebd716ad2f71d2f73abc821e266be552a36f (diff)
Split the interface in several files, part 2
Text interface needs 24 lines instead of 25
Diffstat (limited to 'src/parti386.c')
-rw-r--r--src/parti386.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/parti386.c b/src/parti386.c
index 17abd52..74f352d 100644
--- a/src/parti386.c
+++ b/src/parti386.c
@@ -1285,7 +1285,8 @@ static list_part_t *add_partition_i386_ncurses(disk_t *disk_car,list_part_t *lis
end.sector=disk_car->geom.sectors_per_head;
{
int done = 0;
- while (done==0) {
+ while (done==0)
+ {
int command;
static struct MenuItem menuGeometry[]=
{
@@ -1311,17 +1312,18 @@ static list_part_t *add_partition_i386_ncurses(disk_t *disk_car,list_part_t *lis
wclrtoeol(stdscr);
wrefresh(stdscr);
command=wmenuSimple(stdscr,menuGeometry, position);
- switch (command) {
+ switch (command)
+ {
case 'c':
wmove(stdscr, INTER_GEOM_Y, INTER_GEOM_X);
start.cylinder=ask_number(start.cylinder,
- 0, disk_car->geom.cylinders, "Enter the starting cylinder ");
+ 0, disk_car->geom.cylinders-1, "Enter the starting cylinder ");
position=1;
break;
case 'h':
wmove(stdscr, INTER_GEOM_Y, INTER_GEOM_X);
start.head=ask_number(start.head,
- 0, disk_car->geom.heads_per_cylinder, "Enter the starting head ");
+ 0, disk_car->geom.heads_per_cylinder-1, "Enter the starting head ");
position=2;
break;
case 's':
@@ -1339,7 +1341,7 @@ static list_part_t *add_partition_i386_ncurses(disk_t *disk_car,list_part_t *lis
case 'H':
wmove(stdscr, INTER_GEOM_Y, INTER_GEOM_X);
end.head=ask_number(end.head,
- 0, disk_car->geom.heads_per_cylinder, "Enter the ending head ");
+ 0, disk_car->geom.heads_per_cylinder-1, "Enter the ending head ");
position=5;
break;
case 'S':