Leia o seguinte trecho retirado deste site:
Linus and numerous other kernel developers dislike the ioctl() system call, seeing it as an uncontrolled way of adding new system calls to the kernel. Putting new files into /proc is also discouraged, since that area is seen as being a bit of a mess. Developers who populate their code with ioctl() implementations or /proc files are often encouraged to create a standalone virtual filesystem instead. Filesystems make the interface explicit and visible in user space; they also make it easier to write scripts which perform administrative functions.
Você concorda com Linus e os outros desenvolvedores do kernel?
obj-y += lwnfs/
$ dd if=/dev/zero of=rep bs=1k count=4 $ mkdir -p mnt $ mount -t lwnfs -o loop rep mnt $ cd mnt $ ls $ cat counter0 0 $ cat counter0 1 $ echo 200 > counter1 $ cat counter1 200Faça um teste semelhante para a versão com parte do código para diretórios lwndirfs.c.