Module Name:    src
Committed By:   macallan
Date:           Wed Aug 28 06:20:30 UTC 2024

Modified Files:
        src/sys/arch/hppa/dev: gftfb.c hyperfb.c

Log Message:
properly return status info in ioctl(WSDISPLAYIO_GVIDEO)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/dev/gftfb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/dev/hyperfb.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/arch/hppa/dev/gftfb.c
diff -u src/sys/arch/hppa/dev/gftfb.c:1.18 src/sys/arch/hppa/dev/gftfb.c:1.19
--- src/sys/arch/hppa/dev/gftfb.c:1.18	Mon Aug 19 10:58:43 2024
+++ src/sys/arch/hppa/dev/gftfb.c	Wed Aug 28 06:20:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: gftfb.c,v 1.18 2024/08/19 10:58:43 macallan Exp $	*/
+/*	$NetBSD: gftfb.c,v 1.19 2024/08/28 06:20:30 macallan Exp $	*/
 
 /*	$OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $	*/
 
@@ -854,8 +854,9 @@ gftfb_ioctl(void *v, void *vs, u_long cm
 		gftfb_set_video(sc, *(int *)data);
 		return 0;
 	case WSDISPLAYIO_GVIDEO:
-		return sc->sc_video_on ? 
+		*(u_int *)data = sc->sc_video_on ?
 		    WSDISPLAYIO_VIDEO_ON : WSDISPLAYIO_VIDEO_OFF;
+		return 0;
 	}
 	return EPASSTHROUGH;
 }

Index: src/sys/arch/hppa/dev/hyperfb.c
diff -u src/sys/arch/hppa/dev/hyperfb.c:1.12 src/sys/arch/hppa/dev/hyperfb.c:1.13
--- src/sys/arch/hppa/dev/hyperfb.c:1.12	Mon Aug 19 10:58:43 2024
+++ src/sys/arch/hppa/dev/hyperfb.c	Wed Aug 28 06:20:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: hyperfb.c,v 1.12 2024/08/19 10:58:43 macallan Exp $	*/
+/*	$NetBSD: hyperfb.c,v 1.13 2024/08/28 06:20:30 macallan Exp $	*/
 
 /*
  * Copyright (c) 2024 Michael Lorenz
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.12 2024/08/19 10:58:43 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.13 2024/08/28 06:20:30 macallan Exp $");
 
 #include "opt_cputype.h"
 #include "opt_hyperfb.h"
@@ -649,8 +649,9 @@ hyperfb_ioctl(void *v, void *vs, u_long 
 		hyperfb_set_video(sc, *(int *)data);
 		return 0;
 	case WSDISPLAYIO_GVIDEO:
-		return sc->sc_video_on ?
+		*(u_int *)data = sc->sc_video_on ?
 		    WSDISPLAYIO_VIDEO_ON : WSDISPLAYIO_VIDEO_OFF;
+		return 0;
 	}
 	return EPASSTHROUGH;
 }

Reply via email to