diff options
author | Christophe Grenier <[email protected]> | 2008-07-18 22:16:08 +0200 |
---|---|---|
committer | Christophe Grenier <[email protected]> | 2008-07-18 22:16:08 +0200 |
commit | 8585ef8e51b492783c7d4a3125beeacac1d4314a (patch) | |
tree | ec8cbc98265f903e2ca2063b78f93eb3c358ad23 /src/edit.c | |
parent | cc3bc11be8d37123b2165510fe510c8ca5944385 (diff) |
Store disk geometry in cylinders/heads_per_cylinder/sectors_per_head instead of CHS
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -149,7 +149,7 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba) mvwaddstr(stdscr,INTER_GEOM_Y, INTER_GEOM_X, "Enter the number of cylinders: "); if (get_string(response, LINE_LENGTH, def) > 0) { tmp_val = atoi(response); - if (tmp_val <= disk_car->CHS.cylinder) { + if (tmp_val < disk_car->geom.cylinders) { position.cylinder = tmp_val; } else wprintw(stdscr,"Illegal cylinders value"); @@ -161,7 +161,7 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba) mvwaddstr(stdscr,INTER_GEOM_Y, INTER_GEOM_X, "Enter the number of heads: "); if (get_string(response, LINE_LENGTH, def) > 0) { tmp_val = atoi(response); - if (tmp_val <= disk_car->CHS.head) { + if (tmp_val < disk_car->geom.heads_per_cylinder) { position.head = tmp_val; } else wprintw(stdscr,"Illegal heads value"); @@ -173,7 +173,7 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba) mvwaddstr(stdscr,INTER_GEOM_Y, INTER_GEOM_X, "Enter the number of sectors per track: "); if (get_string(response, LINE_LENGTH, def) > 0) { tmp_val = atoi(response); - if (tmp_val > 0 && tmp_val <= disk_car->CHS.sector ) { + if (tmp_val > 0 && tmp_val <= disk_car->geom.sectors_per_head ) { position.sector = tmp_val; } else wprintw(stdscr,"Illegal sectors value"); |