-/* $OpenBSD: display.c,v 1.19 2013/10/20 22:07:57 miod Exp $ */
+/* $OpenBSD: display.c,v 1.20 2015/05/08 19:12:51 miod Exp $ */
/* $NetBSD: display.c,v 1.1 1998/12/28 14:01:16 hannken Exp $ */
/*-
{ "depth", &depth, FMT_UINT, FLG_RDONLY },
{ "emulations", &emuls, FMT_EMUL, FLG_RDONLY },
{ "screentypes", &screens, FMT_SCREEN, FLG_RDONLY },
- { "focus", &focus, FMT_INT, FLG_MODIFY },
+ { "focus", &focus, FMT_INT, FLG_NORDBACK },
{ "brightness", &brightness, FMT_PC, FLG_MODIFY|FLG_INIT },
{ "contrast", &contrast, FMT_PC, FLG_MODIFY|FLG_INIT },
{ "backlight", &backlight, FMT_PC, FLG_MODIFY|FLG_INIT },
-/* $OpenBSD: wsconsctl.c,v 1.28 2012/07/14 08:28:47 shadchin Exp $ */
+/* $OpenBSD: wsconsctl.c,v 1.29 2015/05/08 19:12:51 miod Exp $ */
/* $NetBSD: wsconsctl.c,v 1.2 1998/12/29 22:40:20 hannken Exp $ */
/*-
if (f->flags & FLG_WRONLY) {
pr_field(devname, f, setsep);
} else {
- f->flags |= FLG_GET;
- (*sw->getval)(devfd);
+ if (!(f->flags & FLG_NORDBACK)) {
+ f->flags |= FLG_GET;
+ (*sw->getval)(devfd);
+ }
if (f->flags & FLG_DEAD)
continue;
pr_field(devname, f, setsep);
-/* $OpenBSD: wsconsctl.h,v 1.14 2013/10/20 22:07:57 miod Exp $ */
+/* $OpenBSD: wsconsctl.h,v 1.15 2015/05/08 19:12:51 miod Exp $ */
/* $NetBSD: wsconsctl.h 1.1 1998/12/28 14:01:17 hannken Exp $ */
/*-
#define FLG_WRONLY 0x0002 /* variable cannot be displayed */
#define FLG_NOAUTO 0x0004 /* skip variable on -a flag */
#define FLG_MODIFY 0x0008 /* variable may be modified with += */
+#define FLG_NORDBACK 0x0010 /* do not read back variable after write */
#define FLG_GET 0x0100 /* read this variable from driver */
#define FLG_SET 0x0200 /* write this variable to driver */
#define FLG_INIT 0x0400 /* init (read) before write */