-/* $OpenBSD: pccons.h,v 1.4 1996/09/01 16:39:57 deraadt Exp $ */
+/* $OpenBSD: pccons.h,v 1.5 1997/03/03 12:01:17 downsj Exp $ */
/* $NetBSD: pccons.h,v 1.4 1996/02/02 18:06:06 mycroft Exp $ */
/*
#define CONSOLE_SET_TYPEMATIC_RATE _IOW('t',124,u_char)
#define CONSOLE_GET_KEYMAP _IOR('t',128,pccons_keymap_t[KB_NUM_KEYS])
#define CONSOLE_SET_KEYMAP _IOW('t',129,pccons_keymap_t[KB_NUM_KEYS])
+#define CONSOLE_SET_BLANK _IOW('t',130,int)
#endif /* _PCCONS_H_ */
-/* $OpenBSD: pccons.c,v 1.33 1996/12/29 12:25:59 graichen Exp $ */
+/* $OpenBSD: pccons.c,v 1.34 1997/03/03 12:01:15 downsj Exp $ */
/* $NetBSD: pccons.c,v 1.99.4.1 1996/06/04 20:03:53 cgd Exp $ */
/*-
static u_short cursor_shape = 0xffff, /* don't update until set by user */
old_cursor_shape = 0xffff;
static pccons_keymap_t scan_codes[KB_NUM_KEYS];/* keyboard translation table */
+static int pc_blank = 300;
#ifdef XSERVER
int pc_xmode = 0;
#endif
return EINVAL;
bcopy(scan_codes, data, sizeof(pccons_keymap_t[KB_NUM_KEYS]));
return 0;
+ case CONSOLE_SET_BLANK:
+ pc_blank = *((int *)data);
+ screen_restore(0);
+ return 0;
default:
return ENOTTY;
}
bcopy(screen_backup, Crtat, ROW*COL*CHR);
screen_saved = 0;
}
- if (! perm)
- timeout(screen_blank, NULL, 300*hz);
+ if (!perm && (pc_blank > 0))
+ timeout(screen_blank, NULL, pc_blank * hz);
}
/*