aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-04-19 20:00:46 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-04-19 20:00:46 +0200
commit7de1c413063d91cd789c9bd88ae8ae4300ecd0c9 (patch)
tree762527306c8e56e417edb1850594a024c7661b64 /com32/hdt
parentd7bf81ab8e20fe46ec0ec7197527125fd3f3c7b6 (diff)
downloadsyslinux-7de1c413063d91cd789c9bd88ae8ae4300ecd0c9.tar.gz
syslinux-7de1c413063d91cd789c9bd88ae8ae4300ecd0c9.tar.xz
syslinux-7de1c413063d91cd789c9bd88ae8ae4300ecd0c9.zip
hdt: Preventing dump mode if no PXE config
Dump mode can only work if PXE is present.
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-dump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/com32/hdt/hdt-dump.c b/com32/hdt/hdt-dump.c
index c1e1e01b..5535b82c 100644
--- a/com32/hdt/hdt-dump.c
+++ b/com32/hdt/hdt-dump.c
@@ -94,6 +94,11 @@ void flush (ZZJSON_CONFIG *config, ZZJSON ** item) {
**/
void dump(struct s_hardware *hardware)
{
+ if (hardware->is_pxe_valid==false) {
+ printf("PXE stack was not detected, Dump feature is not available\n");
+ return;
+ }
+
const union syslinux_derivative_info *sdi = syslinux_derivative_info();
int err=0;
ZZJSON *json = NULL;