pnp.c revision 199767f8919635c4928607450d9e0abb932109ce
/*
* mjs copyright
*
*/
__FBSDID("$FreeBSD$");
/*
* "Plug and Play" functionality.
*
* We use the PnP enumerators to obtain identifiers for installed hardware,
* and the contents of a database to determine modules to be loaded to support
* such hardware.
*/
#include <stand.h>
#include <string.h>
#include <bootstrap.h>
struct pnpinfo_stql pnp_devices;
static int pnp_devices_initted = 0;
static void pnp_discard(void);
/*
* Perform complete enumeration sweep
*/
static int
{
int hdlr;
int verbose;
int ch;
if (pnp_devices_initted == 0) {
pnp_devices_initted = 1;
}
verbose = 0;
optind = 1;
optreset = 1;
switch(ch) {
case 'v':
verbose = 1;
break;
case '?':
default:
/* getopt has already reported an error */
return(CMD_OK);
}
}
/* forget anything we think we knew */
pnp_discard();
/* iterate over all of the handlers */
if (verbose)
}
if (verbose) {
pager_open();
pager_output("PNP scan summary:\n");
pager_output(" : ");
}
pager_output("\n");
}
pager_close();
}
return(CMD_OK);
}
/*
* Throw away anything we think we know about PnP devices.
*/
static void
pnp_discard(void)
{
}
}
/*
* Add a unique identifier to (pi)
*/
void
{
return; /* already have this one */
}
/*
* Allocate a new pnpinfo struct
*/
struct pnpinfo *
pnp_allocinfo(void)
{
return(pi);
}
/*
* Release storage held by a pnpinfo struct
*/
void
{
}
}
/*
* Add a new pnpinfo struct to the list.
*/
void
{
}
/*
* Format an EISA id as a string in standard ISA PnP format, AAAIIRR
* where 'AAA' is the EISA vendor ID, II is the product ID and RR the revision ID.
*/
char *
{
static char idbuf[8];
const char hextoascii[] = "0123456789abcdef";
idbuf[7] = 0;
return(idbuf);
}