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

#define TEST _IO('x', 1)

int main(void)
{
    int err, fd = open("/dev/pippo", O_RDWR);
    if (fd == -1)
    {
        perror("open");
        return -1;
    }
    
    err = ioctl(fd, TEST, NULL);
    if (err == -1)
    {
        perror("ioctl");
        return -1;
    }    


    close(fd);
}

