[syslinux:master] hdt: Preventing dump mode if no PXE config

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Mon Apr 25 15:29:17 PDT 2011


Commit-ID:  7de1c413063d91cd789c9bd88ae8ae4300ecd0c9
Gitweb:     http://syslinux.zytor.com/commit/7de1c413063d91cd789c9bd88ae8ae4300ecd0c9
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Tue, 19 Apr 2011 20:00:46 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Tue, 19 Apr 2011 20:00:46 +0200

hdt: Preventing dump mode if no PXE config

Dump mode can only work if PXE is present.


---
 com32/hdt/hdt-dump.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

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;



More information about the Syslinux-commits mailing list