It might be useful to suppress MDISKCHK.COM's classic behaviour
of probing all BIOS drive numbers in search of MEMDISKs. Some BIOSes
might not enjoy being probed.
Reported-by: bylokk
Reported-by: Gert Hulselmans <gerth@zytor.com>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
"Action: --safe-hooks . . Will scan INT 13h \"safe hook\" chain\n"
" --mbfts . . . . Will scan memory for MEMDISK mBFTs\n"
" --batch-output . Will output SET command output based\n"
- " on MEMDISK kernel arguments\n");
+ " on MEMDISK kernel arguments\n"
+ " --no-sequential Suppresses probing all drive numbers\n");
}
/* Search memory for mBFTs and report them via the output method */
{
int d;
int found = 0;
+ int sequential_scan = 1; /* Classic behaviour */
const struct memdiskinfo *m;
/* Default behaviour */
case 'b':
show_memdisk = batch_output;
break;
+ case 'N':
+ case 'n':
+ sequential_scan = 0;
+ break;
default:
usage = show_usage;
} /* switch */
safe_hooks();
mbfts();
+ if (!sequential_scan)
+ goto skip_sequential;
for (d = 0; d <= 0xff; d++) {
m = query_memdisk(d);
if (m != NULL) {
show_memdisk(d, m);
}
}
+skip_sequential:
usage();
return found;