summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1999-12-09 12:32:50 +0000
committerkato <kato@FreeBSD.org>1999-12-09 12:32:50 +0000
commit7fe95b26a2caf5b1c59fa606ad633557bdcf1f01 (patch)
tree6ed0deb69d1c8174a66119cd6d0766d05a881ac7 /sys
parent5cec9086b077ebf2671fb2717b21dd799e11a9e1 (diff)
downloadFreeBSD-src-7fe95b26a2caf5b1c59fa606ad633557bdcf1f01.zip
FreeBSD-src-7fe95b26a2caf5b1c59fa606ad633557bdcf1f01.tar.gz
Sync with sys/dev/fb/vga.c rev 1.5.
Submitted by: yokota
Diffstat (limited to 'sys')
-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