summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>1999-12-09 12:00:30 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>1999-12-09 12:00:30 +0000
commita9c9ca4e75ccad575edd787046c365fc964905b8 (patch)
tree468e4e6e7dccde34136a6213db75f85898a8db4b /sys
parentd2884a4f1f29c04401956d4c8b2ce6c2910cd4df (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/pc98/pc98gdc.c9
-rw-r--r--sys/pc98/pc98/scvidctl.c3
2 files changed, 5 insertions, 7 deletions
diff --git a/sys/pc98/pc98/pc98gdc.c b/sys/pc98/pc98/pc98gdc.c
index 62ebd1df9a4d..729845e8731e 100644
--- a/sys/pc98/pc98/pc98gdc.c
+++ b/sys/pc98/pc98/pc98gdc.c
@@ -612,11 +612,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 (!init_done)
- return -1;
+ return ENXIO;
for (i = 0; bios_vmode[i].vi_mode != EOT; ++i) {
if (bios_vmode[i].vi_mode == NA)
@@ -646,11 +645,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/scvidctl.c b/sys/pc98/pc98/scvidctl.c
index 828ee8eeb5ef..1d718ef99d18 100644
--- a/sys/pc98/pc98/scvidctl.c
+++ b/sys/pc98/pc98/scvidctl.c
@@ -410,8 +410,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
? ENODEV : 0);
case CONS_FINDMODE: /* find a matching video mode */
- return ((*vidsw[scp->ad]->query_mode)(scp->adp, (video_info_t *)data)
- ? ENODEV : 0);
+ return (*vidsw[scp->ad]->query_mode)(scp->adp, (video_info_t *)data);
case CONS_SETWINORG:
return ((*vidsw[scp->ad]->set_win_org)(scp->adp, *(u_int *)data)