aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2015-08-19 07:22:19 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2015-09-04 17:57:52 +0200
commitd0fde22e65cb2c7b8af8e7d8a9f08d5de7941876 (patch)
treea329512923a198f5e41dcadc9d1d9264c36becc0 /com32/hdt
parentac87e802d87134170faa323085b2165599cdad01 (diff)
downloadsyslinux-d0fde22e65cb2c7b8af8e7d8a9f08d5de7941876.tar.gz
syslinux-d0fde22e65cb2c7b8af8e7d8a9f08d5de7941876.tar.xz
syslinux-d0fde22e65cb2c7b8af8e7d8a9f08d5de7941876.zip
hdt: print tftp error number & message if dump failed
The current code was making a mistake by searching the -err element in the array as it was resulting into a negative value. The current patch does print the error number which could be useful but also retrieve the proper string to indicate the real error we encountered.
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-dump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/hdt/hdt-dump.c b/com32/hdt/hdt-dump.c
index 7d608a0c..03049d9b 100644
--- a/com32/hdt/hdt-dump.c
+++ b/com32/hdt/hdt-dump.c
@@ -228,7 +228,8 @@ void dump(struct s_hardware *hardware)
/* As we manage a tftp connection, let's display the associated error message */
more_printf("Dump failed !\n");
more_printf("TFTP ERROR on : %s:/%s \n", hardware->tftp_ip, filename);
- more_printf("TFTP ERROR msg : %s \n", tftp_string_error_message[-err]);
+ more_printf("TFTP ERROR num : %d \n", err);
+ more_printf("TFTP ERROR msg : %s \n", tftp_string_error_message[err]);
} else {
more_printf("Dump file sent at %s:/%s\n", hardware->tftp_ip, filename);
}