aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt/hdt-cli-disk.c
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-23 14:31:53 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-23 14:36:15 -0700
commit406c7bdd3e5d7238edb8c319bf171b1b3888ad88 (patch)
treeab37b524c69b125375190ad4b5851044ecd96b2f /com32/hdt/hdt-cli-disk.c
parentb5dab6d5656da5e90ad9b80b85f2ebb7a61d418d (diff)
downloadhdt-406c7bdd3e5d7238edb8c319bf171b1b3888ad88.tar.gz
hdt-406c7bdd3e5d7238edb8c319bf171b1b3888ad88.tar.xz
hdt-406c7bdd3e5d7238edb8c319bf171b1b3888ad88.zip
hdt: enhance user experience (CLI)
Some users have reported that reading the CLI can be difficult, especially when spitting out a lot of information. This patch: * adds a missing reset_more_printf() in the disk CLI * reduces the total scrolling to 20 lines (seems better in my testing) * removes a reset_more_printf() in the show disk function. This can potentially be bad when doing a lot of show disk 0xXX (especially after 4 in a row) but enhances the display when running show disks with lots of disks. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt/hdt-cli-disk.c')
-rw-r--r--com32/hdt/hdt-cli-disk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/com32/hdt/hdt-cli-disk.c b/com32/hdt/hdt-cli-disk.c
index be171acf..ac1b15fd 100644
--- a/com32/hdt/hdt-cli-disk.c
+++ b/com32/hdt/hdt-cli-disk.c
@@ -100,7 +100,6 @@ static void show_partition_information(struct driveinfo *drive_info,
void main_show_disk(int argc, char **argv,
struct s_hardware *hardware)
{
- reset_more_printf();
if (!argc) {
more_printf("Which disk?\n");
return;
@@ -152,6 +151,8 @@ void main_show_disk(int argc, char **argv,
}
fprintf(stderr, "\n");
}
+
+ more_printf("\n");
}
void main_show_disks(int argc __unused, char **argv __unused,
@@ -174,6 +175,7 @@ void disks_summary(int argc __unused, char** argv __unused,
int i = -1;
detect_disks(hardware);
+ reset_more_printf();
for (int drive = 0x80; drive < 0xff; drive++) {
i++;