summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/pc98/cbus/gdc.c9
-rw-r--r--sys/pc98/pc98/pc98gdc.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c
index bcb97db..e8c1d7e 100644
--- a/sys/pc98/cbus/gdc.c
+++ b/sys/pc98/cbus/gdc.c
@@ -689,11 +689,10 @@ gdc_get_info(video_adapter_t *adp, int mode, video_info_t *info)
static int
gdc_query_mode(video_adapter_t *adp, video_info_t *info)
{
- video_info_t buf;
int i;
if (!gdc_init_done)
- return -1;
+ return ENXIO;
for (i = 0; bios_vmode[i].vi_mode != EOT; ++i) {
if (bios_vmode[i].vi_mode == NA)
@@ -723,11 +722,11 @@ gdc_query_mode(video_adapter_t *adp, video_info_t *info)
continue;
/* verify if this mode is supported on this adapter */
- if (gdc_get_info(adp, bios_vmode[i].vi_mode, &buf))
+ if (gdc_get_info(adp, bios_vmode[i].vi_mode, info))
continue;
- return bios_vmode[i].vi_mode;
+ return 0;
}
- return -1;
+ return ENODEV;
}
/*
diff --git a/sys/pc98/pc98/pc98gdc.c b/sys/pc98/pc98/pc98gdc.c
index bcb97db..e8c1d7e 100644
--- a/sys/pc98/pc98/pc98gdc.c
+++ b/sys/pc98/pc98/pc98gdc.c
@@ -689,11 +689,10 @@ gdc_get_info(video_adapter_t *adp, int mode, video_info_t *info)
static int
gdc_query_mode(video_adapter_t *adp, video_info_t *info)
{
- video_info_t buf;
int i;
if (!gdc_init_done)
- return -1;
+ return ENXIO;
for (i = 0; bios_vmode[i].vi_mode != EOT; ++i) {
if (bios_vmode[i].vi_mode == NA)
@@ -723,11 +722,11 @@ gdc_query_mode(video_adapter_t *adp, video_info_t *info)
continue;
/* verify if this mode is supported on this adapter */
- if (gdc_get_info(adp, bios_vmode[i].vi_mode, &buf))
+ if (gdc_get_info(adp, bios_vmode[i].vi_mode, info))
continue;
- return bios_vmode[i].vi_mode;
+ return 0;
}
- return -1;
+ return ENODEV;
}
/*
OpenPOWER on IntegriCloud