
/*
 * INDEBUG device level
 *
 * (c)Copyright 1994, Matthew Dillon, All rights reserved.  This code may
 *    be used in any project, commercial or otherwise, as long as I am given
 *    appropriate credit and as long as this copyright remains intact in all
 *    source and document files.
 */

#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/ddi.h>

main(ac, av)
char *av[];
{
    int fd;
    int i;

    if (ac != 3) {
        puts("INDEBUG device level");
        exit(0);
    }
    if ((fd = open(av[1], O_RDWR)) >= 0) {
        i = strtol(av[2], NULL, 0);
        if (ioctl(fd, DDIOCSDBG, &i) != 0) {
            perror("ioctl");
        }
    }
    exit(0);
}

