From e3f4df5bf10f5a64cfffdaa4f40a3960bd98cb95 Mon Sep 17 00:00:00 2001 From: Shao Miller Date: Sat, 6 Aug 2011 05:24:46 -0400 Subject: [PATCH] ifmemdsk.c32: Allow boot options based on presence of MEMDISK Like 'ifcpu.c32' and 'ifplop.c32', this COMBOOT32 module will check for the presence of MEMDISK(s) and choose one of two (optionally) specified commands. Signed-off-by: Shao Miller --- NEWS | 1 + com32/modules/ifmemdsk.c | 392 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 393 insertions(+) create mode 100755 com32/modules/ifmemdsk.c diff --git a/NEWS b/NEWS index 88adba1..7700504 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ Changes in 4.05: on virtually all systems since the beginning, and has been totally broken since 4.00 at least. Use MEMDISK instead. * chain.c32: Support chaining ReactOS' FreeLdr (Shao Miller) + * ifmemdsk.c32: Choose boot option based on presence of MEMDISK Changes in 4.04: * PXELINUX: Fix handling of unqualified DNS names. diff --git a/com32/modules/ifmemdsk.c b/com32/modules/ifmemdsk.c new file mode 100755 index 0000000..cfed87f --- /dev/null +++ b/com32/modules/ifmemdsk.c @@ -0,0 +1,392 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 2011 Shao Miller - All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston MA 02110-1301, USA; either version 2 of the License, or + * (at your option) any later version; incorporated herein by reference. + * + * ----------------------------------------------------------------------- */ + +/**** + * @file ifmemdsk.c + * + * This COM32 module detects if there are MEMDISKs established. + */ + +static const char usage_text[] = "\ +Usage:\n\ + ifmemdsk.c32 [