I include a tests program:
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
static char buffer [8];
main ()
{
int fd;
printf ("Before: [%s]\n", buffer);
fd = open ("/proc/locks", O_RDONLY);
if (fd == -1){
printf ("Can not open /proc/locks");
exit (1);
}
read (fd, buffer, 1);
read (fd, buffer, 1);
read (fd, buffer, 1);
read (fd, buffer, 1);
read (fd, buffer, 1);
read (fd, buffer, 1);
read (fd, buffer, 1);
printf ("Read: [%s]\n", buffer);
}
miguel.
-
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/