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:31:53 -0700
commit6f74f1b4edbed5af2e279f31516024c01a2d4bd3 (patch)
tree42751a20337ade5576d91ae4f475e7d67f8a436a /com32/hdt/hdt-cli-disk.c
parent80726ee72df67c2c27ee8a58561e08a9cac30e9c (diff)
downloadhdt-6f74f1b4edbed5af2e279f31516024c01a2d4bd3.tar.gz
hdt-6f74f1b4edbed5af2e279f31516024c01a2d4bd3.tar.xz
hdt-6f74f1b4edbed5af2e279f31516024c01a2d4bd3.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 4e2994d9..5836d216 100644
--- a/com32/hdt/hdt-cli-disk.c
+++ b/com32/hdt/hdt-cli-disk.c
@@ -99,7 +99,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;
@@ -145,6 +144,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,
@@ -167,6 +168,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++;