hdt: enhance error reporting in the CLI (disk) syslinux-3.83-pre9
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 22 Aug 2009 18:08:04 +0000 (11:08 -0700)
committerErwan Velu <erwan.velu@free.fr>
Mon, 24 Aug 2009 13:34:37 +0000 (15:34 +0200)
commitb7ec0f07b339aed8bd2b8da3603b0ee9a6a7417a
tree3277e81eb11732b05b1459258a26d7c7faef9df0
parent9ffe8b0b4e2ff9b98813521f79c840d983424f82
hdt: enhance error reporting in the CLI (disk)

parse_partition_table can fail for two reasons: disk I/O
error or unrecognized partition layout (non msdos, corrupt, ...).

In the latter case, we were displaying

   Error parsing disk 0x80
   parse_partition_table: error 0

which is confusing. We now display

   Disk 0x80: unrecognized partition layout

or the errno_disk in case of I/O errors.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/hdt/hdt-cli-disk.c