From 7de1c413063d91cd789c9bd88ae8ae4300ecd0c9 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Tue, 19 Apr 2011 20:00:46 +0200 Subject: [PATCH] hdt: Preventing dump mode if no PXE config Dump mode can only work if PXE is present. --- com32/hdt/hdt-dump.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/com32/hdt/hdt-dump.c b/com32/hdt/hdt-dump.c index c1e1e01..5535b82 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; -- 2.7.4