From 7fe95b26a2caf5b1c59fa606ad633557bdcf1f01 Mon Sep 17 00:00:00 2001 From: kato Date: Thu, 9 Dec 1999 12:32:50 +0000 Subject: Sync with sys/dev/fb/vga.c rev 1.5. Submitted by: yokota --- sys/pc98/cbus/gdc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/pc98/cbus/gdc.c') 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; } /* -- cgit v1.1