freebsd-ports/sysutils/contool/files/patch-02
David E. O'Brien 3b64458b93 Contool will capture and display system console messages with timestamps.
It is a replacement for the standard X console.  Contool will flash its
icon and beep when messages are written to the icon, so you can keep it
closed on your desktop until a message arrives.  You can modify this
beeping and flashing behavior; see the man page for more details.

You can instruct contool to filter and ignore certain common console
messages or act upon them.

Submitted by:   Nick Sayer <nsayer@@quack.kfu.com> (w/changes by me)
Closes PR:      ports/2152
1997-01-06 10:26:28 +00:00

29 lines
672 B
Plaintext

--- contool.c.orig Thu Feb 24 09:55:30 1994
+++ contool.c Sun Jan 5 13:48:41 1997
@@ -284,6 +284,9 @@
EXPORT acquire_console()
{ int console;
+#if (defined(BSD) && (BSD >= 199306))
+ int i;
+#endif
#ifdef SVR4
if (slave > 0) {
@@ -293,8 +296,15 @@
abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]);
}
#else
+#if (defined(BSD) && (BSD >= 199306))
+ i=1;
+#endif
if (slave > 0)
+#if (defined(BSD) && (BSD >= 199306))
+ if (ioctl(slave, TIOCCONS, &i) == -1)
+#else
if (ioctl(slave, TIOCCONS, NULL) == -1)
+#endif
abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]);
#endif
}