add the command ioprobe.

This commit is contained in:
okuji committed 1999-10-29 10:52:28 +00:00
1 parent d0f94a1f1c
commit d7c7eb7897
5 files changed
+126 -72

No files matched your search

+44
View File
@@ -1441,6 +1441,49 @@ static struct builtin builtin_install =
" this is the name of the true Stage 2) at boot time."
};
/* ioprobe */
static int
ioprobe_func (char *arg, int flags)
{
#ifdef GRUB_UTIL
errnum = ERR_UNRECOGNIZED;
return 1;
#else /* ! GRUB_UTIL */
unsigned short *port;
/* Get the drive number. */
set_device (arg);
if (errnum)
return 1;
/* Clean out IO_MAP. */
grub_memset ((char *) io_map, 0, IO_MAP_SIZE * sizeof (unsigned short));
/* Track the int13 handler. */
track_int13 (current_drive);
/* Print out the result. */
for (port = io_map; *port != 0; port++)
grub_printf (" 0x%x", (unsigned int) *port);
return 0;
#endif /* ! GRUB_UTIL */
}
static struct builtin builtin_ioprobe =
{
"ioprobe",
ioprobe_func,
BUILTIN_CMDLINE,
"ioprobe DRIVE",
"Probe I/O ports used for the drive DRIVE."
};
/* kernel */
static int
@@ -2470,6 +2513,7 @@ struct builtin *builtin_table[] =
&builtin_impsprobe,
&builtin_initrd,
&builtin_install,
&builtin_ioprobe,
&builtin_kernel,
&builtin_makeactive,
&builtin_map,