aboutsummaryrefslogtreecommitdiffstats
path: root/com32
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
parent80726ee72df67c2c27ee8a58561e08a9cac30e9c (diff)
downloadsyslinux-6f74f1b4edbed5af2e279f31516024c01a2d4bd3.tar.gz
syslinux-6f74f1b4edbed5af2e279f31516024c01a2d4bd3.tar.xz
syslinux-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')
-rw-r--r--com32/hdt/hdt-cli-disk.c4
-rw-r--r--com32/hdt/hdt-common.h4
2 files changed, 5 insertions, 3 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++;
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h
index 2b67f9ca..b3b71dc4 100644
--- a/com32/hdt/hdt-common.h
+++ b/com32/hdt/hdt-common.h
@@ -51,8 +51,8 @@
extern int display_line_nb;
#define more_printf(...) do {\
- if (display_line_nb == 23) {\
- printf("Press any key to continue\n");\
+ if (display_line_nb == 20) {\
+ printf("\nPress any key to continue");\
display_line_nb=0;\
get_key(stdin, 0);\
}\