On Mon, Jul 20, 2020 at 04:36:46PM +0200, Frederic Cambus wrote:

> Here is a diff to allow the WSDISPLAYIO_GETSCREENTYPE ioctl on the
> tty*cfg device, passing it back to tty*0.
> 
> I need this to restore working defaults in wsfontload(8).
> 
> Comments? OK?
> 
> Index: sys/dev/wscons/wsdisplay.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/wscons/wsdisplay.c,v
> retrieving revision 1.141
> diff -u -p -r1.141 wsdisplay.c
> --- sys/dev/wscons/wsdisplay.c        25 May 2020 09:55:49 -0000      1.141
> +++ sys/dev/wscons/wsdisplay.c        20 Jul 2020 14:28:42 -0000
> @@ -1046,10 +1046,15 @@ wsdisplayioctl(dev_t dev, u_long cmd, ca
>  #endif
>  
>       if (ISWSDISPLAYCTL(dev)) {
> -             if (cmd != WSDISPLAYIO_GTYPE)
> +             switch (cmd) {
> +             case WSDISPLAYIO_GTYPE:
> +             case WSDISPLAYIO_GETSCREENTYPE:
> +                     /* pass to the first screen */
> +                     dev = makedev(major(dev), WSDISPLAYMINOR(unit, 0));
> +                     break;
> +             default:
>                       return (wsdisplay_cfg_ioctl(sc, cmd, data, flag, p));
> -             /* pass WSDISPLAYIO_GTYPE to the first screen */
> -             dev = makedev(major(dev), WSDISPLAYMINOR(unit, 0));
> +             }
>       }
>  
>       if (WSDISPLAYSCREEN(dev) >= WSDISPLAY_MAXSCREEN)

Ping. Anyone willing to look at this? Thanks!

Reply via email to