diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2004-11-26 17:56:02 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2004-11-26 17:56:02 +0000 |
commit | 723c8b552ef0a7b12a772d4ba070bd5f4e1c3b7d (patch) | |
tree | e73fa4364e5de157f61d56b3fd6fd3b75aae0ae4 /oops_test.c | |
parent | 0185bdf2af7d54c72dc57cd2fd89d1d8bf0e94f6 (diff) | |
download | rsyslog-723c8b552ef0a7b12a772d4ba070bd5f4e1c3b7d.tar.gz rsyslog-723c8b552ef0a7b12a772d4ba070bd5f4e1c3b7d.tar.xz rsyslog-723c8b552ef0a7b12a772d4ba070bd5f4e1c3b7d.zip |
preparing for packaging
Diffstat (limited to 'oops_test.c')
-rw-r--r-- | oops_test.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/oops_test.c b/oops_test.c deleted file mode 100644 index f710d4cd..00000000 --- a/oops_test.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This is a small test program for generating a kernel protection fault - * using the oops loadable module. - * - * Fri Apr 26 12:52:43 CDT 1996: Dr. Wettstein - * Initial version. - */ - - -/* Includes. */ -#include <stdio.h> -#include <unistd.h> -#include <fcntl.h> -#include <sys/ioctl.h> - - -/* Function prototypes. */ -extern int main(int, char **); - - -extern int main(argc, argv) - - int argc; - - char *argv[]; - -{ - auto int fd; - - if ( argc != 2 ) - { - fprintf(stderr, "No oops device specified.\n"); - return(1); - } - - if ( (fd = open(argv[1], O_RDONLY)) < 0 ) - { - fprintf(stderr, "Cannot open device: %s.\n", argv[1]); - return(1); - } - - if ( ioctl(fd, 1, 0) < 0 ) - { - fprintf(stderr, "Failed on oops.\n"); - return(1); - } - - printf("OOoops\n"); - - close(fd); - return(0); -} |