Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic pcdisplay_getwschar: on error return error code, ...
details: https://anonhg.NetBSD.org/src/rev/6884373a760e
branches: trunk
changeset: 364443:6884373a760e
user: uwe <uwe%NetBSD.org@localhost>
date: Fri Mar 25 12:24:44 2022 +0000
description:
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.
diffstat:
sys/dev/ic/pcdisplay_subr.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 1651de1ca3b2 -r 6884373a760e sys/dev/ic/pcdisplay_subr.c
--- a/sys/dev/ic/pcdisplay_subr.c Fri Mar 25 08:57:50 2022 +0000
+++ b/sys/dev/ic/pcdisplay_subr.c Fri Mar 25 12:24:44 2022 +0000
@@ -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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index