]> granicus.if.org Git - strace/commitdiff
tests/llseek.c: cleanup
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 21:00:47 +0000 (21:00 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 22:05:55 +0000 (22:05 +0000)
* tests/llseek.c (main): Use errno2name, stop using assert.

tests/llseek.c

index 2f691711a2f1f2eba8e38c09386f2f5617c30fb1..9df2c088d7f4a2637c5c3744be4ab52c4b2eb9d0 100644 (file)
@@ -43,12 +43,9 @@ main(void)
        const long long offset = 0xfacefeeddeadbeefLL;
        unsigned long long result;
 
-       assert(syscall(__NR__llseek, -1, high, low, &result, SEEK_SET) == -1);
-       if (EBADF != errno)
-               perror_msg_and_skip("_llseek");
-
-       printf("_llseek(-1, %lld, %p, SEEK_SET) = -1 EBADF (%m)\n",
-              offset, &result);
+       long rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET);
+       printf("_llseek(-1, %lld, %p, SEEK_SET) = %ld %s (%m)\n",
+              offset, &result, rc, errno2name());
 
        puts("+++ exited with 0 +++");
        return 0;