/* from linux 2.1.x kernel sources.. with small changes by kreator, 1998 */ #include #include #include #include #include #define LPTRUSTIRQ 0x060f int main(int argc, char **argv) { int fd=open("/dev/lp0", O_RDONLY); ioctl(fd, LPTRUSTIRQ, argc - 1); openlog(argv[0], LOG_PID, LOG_LPR); if (argc-1) syslog(LOG_LPR|LOG_INFO, "trusting the irq\n"); else syslog(LOG_LPR|LOG_INFO, "untrusting the irq\n"); closelog(); close(fd); return 0; }