Module Name: src Committed By: uwe Date: Fri Mar 25 12:24:44 UTC 2022
Modified Files: src/sys/dev/ic: pcdisplay_subr.c Log Message: pcdisplay_getwschar: on error return error code, not -1. This value ends up being returned from vga_ioctl to sys_ioctl which expects an errno and spams kernel log otherwise. Ditto for pcdisplay_putwschar. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/pcdisplay_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/pcdisplay_subr.c diff -u src/sys/dev/ic/pcdisplay_subr.c:1.35 src/sys/dev/ic/pcdisplay_subr.c:1.36 --- src/sys/dev/ic/pcdisplay_subr.c:1.35 Tue Oct 19 22:27:19 2010 +++ src/sys/dev/ic/pcdisplay_subr.c Fri Mar 25 12:24:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pcdisplay_subr.c,v 1.35 2010/10/19 22:27:19 jmcneill Exp $ */ +/* $NetBSD: pcdisplay_subr.c,v 1.36 2022/03/25 12:24:44 uwe Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcdisplay_subr.c,v 1.35 2010/10/19 22:27:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcdisplay_subr.c,v 1.36 2022/03/25 12:24:44 uwe Exp $"); #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -306,7 +306,7 @@ pcdisplay_getwschar(struct pcdisplayscre off = wschar->row * scr->type->ncols + wschar->col; if (off >= scr->type->ncols * scr->type->nrows) - return -1; + return EINVAL; if (scr->active) chardata = bus_space_read_2(scr->hdl->ph_memt, @@ -336,7 +336,7 @@ pcdisplay_putwschar(struct pcdisplayscre off = wschar->row * scr->type->ncols + wschar->col; if (off >= (scr->type->ncols * scr->type->nrows)) - return -1; + return EINVAL; attrbyte = wschar->background & 0x07; if (wschar->flags & WSDISPLAY_CHAR_BLINK) attrbyte |= 0x08;