7 #include <sys/syscall.h>
13 static const char fname[] = "readlink.link";
14 unsigned char buf[31];
18 rc = syscall(__NR_readlink, fname, buf, sizeof(buf));
22 printf("readlink(\"");
23 for (i = 0; fname[i]; ++i)
24 printf("\\x%02x", (int) (unsigned char) fname[i]);
26 for (i = 0; i < 3; ++i)
27 printf("\\x%02x", (int) buf[i]);
28 printf("\"..., %zu) = %ld\n", sizeof(buf), rc);
30 puts("+++ exited with 0 +++");