]> granicus.if.org Git - strace/blobdiff - tests/symlinkat.c
tests: extend TEST_NETLINK_OBJECT macro
[strace] / tests / symlinkat.c
index 37d055aa9e775cc0ddb7195e54d7951857fbd23e..6e5d617db44b5b8159481eba9fa03eee8874b967 100644 (file)
@@ -1,22 +1,21 @@
 #include "tests.h"
-#include <sys/syscall.h>
+#include <asm/unistd.h>
 
 #ifdef __NR_symlinkat
 
-# include <errno.h>
 # include <stdio.h>
 # include <unistd.h>
 
 int
 main(void)
 {
-       const long int fd = (long int) 0xdeadbeefffffffff;
+       const long int fd = (long int) 0xdeadbeefffffffffULL;
        static const char oldpath[] = "symlink_old";
        static const char newpath[] = "symlink_new";
+
        long rc = syscall(__NR_symlinkat, oldpath, fd, newpath);
        printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n",
-              oldpath, (int) fd, newpath, rc,
-              errno == ENOSYS ? "ENOSYS" : "EBADF");
+              oldpath, (int) fd, newpath, rc, errno2name());
 
        puts("+++ exited with 0 +++");
        return 0;