summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-04-18 18:13:15 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-04-18 18:13:15 +0200
commitb9fbd6cadb4f610ccdff30ffc59e87b354cc90d1 (patch)
tree0a5aa9537c2c988d36c719db6fd61e877d11d6ee /src/edit.c
parent77d476a5ca79f234b5d9840fe83be9637ce94f53 (diff)
Handle more than 80 columns
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/edit.c b/src/edit.c
index f5b9d1a..4639957 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -128,8 +128,8 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba)
{
CHS_t position;
int done = 0;
- char def[LINE_LENGTH];
- char response[LINE_LENGTH];
+ char def[128];
+ char response[128];
unsigned long int tmp_val;
int command;
position.cylinder=offset2cylinder(disk_car,*lba);
@@ -153,7 +153,7 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba)
case 'C':
sprintf(def, "%lu", position.cylinder);
mvwaddstr(stdscr,INTER_GEOM_Y, INTER_GEOM_X, "Enter the number of cylinders: ");
- if (get_string(response, LINE_LENGTH, def) > 0) {
+ if (get_string(response, sizeof(response), def) > 0) {
tmp_val = atol(response);
if (tmp_val < disk_car->geom.cylinders) {
position.cylinder = tmp_val;
@@ -165,7 +165,7 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba)
case 'H':
sprintf(def, "%u", position.head);
mvwaddstr(stdscr,INTER_GEOM_Y, INTER_GEOM_X, "Enter the number of heads: ");
- if (get_string(response, LINE_LENGTH, def) > 0) {
+ if (get_string(response, sizeof(response), def) > 0) {
tmp_val = atoi(response);
if (tmp_val < disk_car->geom.heads_per_cylinder) {
position.head = tmp_val;
@@ -177,7 +177,7 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba)
case 'S':
sprintf(def, "%u", position.sector);
mvwaddstr(stdscr,INTER_GEOM_Y, INTER_GEOM_X, "Enter the number of sectors per track: ");
- if (get_string(response, LINE_LENGTH, def) > 0) {
+ if (get_string(response, sizeof(response), def) > 0) {
tmp_val = atoi(response);
if (tmp_val > 0 && tmp_val <= disk_car->geom.sectors_per_head ) {
position.sector = tmp_val;