Ifmemdsk.c32

From Syslinux Wiki
Jump to: navigation, search


ifmemdsk.c32 is a COM32 module for Syslinux that selects which command to execute, based on the presence of MEMDISK, by detecting whether there are MEMDISKs established.

It is available in Syslinux 4.06 or later.

Similar to ifcpu.c32 and ifplop.c32, this module will check for the presence of MEMDISK(s) and choose one of two (optionally) specified commands.

Usage

ifmemdsk.c32 [option [...]] --info [option [...]]
ifmemdsk.c32 [option [...]] [detected_cmd] -- [not_detected_cmd]

Options:

--info           Display info about MEMDISK(s)
--safe-hooks     Scan INT 13h "safe hook" chain
--mbfts          Scan memory for MEMDISK mBFTs
--no-sequential  Suppress probing all drive numbers

If a MEMDISK is found, or if a particular MEMDISK is sought by the options and is found, then the "detected_cmd" action will be taken, else the "not_detected_cmd" action will be taken.

Examples

LABEL ifmemdiskinfo
COM32 ifmemdsk.c32
APPEND --info

LABEL ifmemdiskinfo_nosequential
COM32 ifmemdsk.c32
APPEND --no-sequential --info


# Select a label according to options:
# execute label 'sh' when appropriate;
# otherwise execute label 'no_mdsk_w_sh'.
#
LABEL ifmemdisk_safehooks
COM32 ifmemdsk.c32
APPEND --safe-hooks sh -- no_mdsk_w_sh

See also