Yes, ugly. However, the other alternative (that doesn't work with some
2.1.x kernels, but they are broken, so you can just blame the kernel in
that case) is to just append a '/' to the end of the name. That way the
kernel will not allow you to open the file unless it's a directory.
Finally, I should probably just add a "opendir()" system call. That way
I could return EISDIR for normal open() calls some day in the future
when we can drop the old binary support. Consider it done.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/