src/disk
This commit is contained in:
@@ -52,49 +52,60 @@ hdc_log(const char *fmt, ...)
|
||||
#define hdc_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
static void *
|
||||
null_init(const device_t *info)
|
||||
nullhdc_init(const device_t *info)
|
||||
{
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
null_close(void *priv)
|
||||
nullhdc_close(void *priv)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
inthdc_init(const device_t *info)
|
||||
{
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
inthdc_close(void *priv)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static const device_t hdc_none_device = {
|
||||
"None", "none", 0, 0,
|
||||
null_init, null_close, NULL,
|
||||
{ NULL }, NULL, NULL, NULL
|
||||
};
|
||||
static const device_t hdc_internal_device = {
|
||||
"Internal", "internal", 0, 0,
|
||||
inthdc_init, inthdc_close, NULL,
|
||||
{ NULL }, NULL, NULL, NULL
|
||||
.name = "None",
|
||||
.internal_name = "none",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = nullhdc_init,
|
||||
.close = nullhdc_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
static const device_t hdc_internal_device = {
|
||||
.name = "Internal",
|
||||
.internal_name = "internal",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = inthdc_init,
|
||||
.close = inthdc_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
static const struct {
|
||||
// clang-format off
|
||||
const device_t *device;
|
||||
} controllers[] = {
|
||||
// clang-format off
|
||||
{ &hdc_none_device },
|
||||
{ &hdc_internal_device },
|
||||
{ &st506_xt_xebec_device },
|
||||
@@ -118,7 +129,7 @@ static const struct {
|
||||
{ &ide_pci_2ch_device },
|
||||
{ &ide_vlb_device },
|
||||
{ &ide_vlb_2ch_device },
|
||||
{ NULL }
|
||||
{ NULL }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user