]> granicus.if.org Git - strace/commitdiff
print_sigevent: fix field names of sigev_value structure
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 28 Nov 2016 19:12:12 +0000 (22:12 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 29 Nov 2016 00:33:01 +0000 (00:33 +0000)
* print_sigevent.c (print_sigevent): Change "int" to "sival_int", "ptr"
to "sival_ptr".
* tests/mq_sendrecv.c (main): Update expected output in accordance with
fixed field names.
* tests/timer_create.c (main): Likewise.

print_sigevent.c
tests/mq_sendrecv.c
tests/timer_create.c

index caf1fdfe29843973b35468bd1fdbc2c2dc47de80..da912ba3cc8dc93a2f48dba78d91f109a77cf763 100644 (file)
@@ -44,7 +44,7 @@ MPERS_PRINTER_DECL(void, print_sigevent, struct tcb *tcp, const long addr)
 
        tprints("{");
        if (sev.sigev_value.sival_ptr) {
-               tprintf("sigev_value={int=%d, ptr=",
+               tprintf("sigev_value={sival_int=%d, sival_ptr=",
                        sev.sigev_value.sival_int);
                printaddr((unsigned long) sev.sigev_value.sival_ptr);
                tprints("}, ");
index 34eb97c822c3a28543c1d036c0431a298c69a1b9..995bbb0d0cc52ce543a44e1791a987453131536b 100644 (file)
@@ -372,7 +372,7 @@ main(void)
 
        /* Invalid SIGEV_* */
        rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
-       printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}"
+       printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}"
               ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}) = %s\n",
               (int) bogus_fd, bogus_sev->sigev_value.sival_int,
               bogus_sev->sigev_value.sival_ptr,
@@ -382,7 +382,7 @@ main(void)
        /* SIGEV_NONE */
        bogus_sev->sigev_notify = SIGEV_NONE;
        rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
-       printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
+       printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, "
               "sigev_signo=%u, sigev_notify=SIGEV_NONE}) = %s\n",
               (int) bogus_fd, bogus_sev->sigev_value.sival_int,
               bogus_sev->sigev_value.sival_ptr,
@@ -392,7 +392,7 @@ main(void)
        bogus_sev->sigev_notify = SIGEV_SIGNAL;
        bogus_sev->sigev_signo = SIGALRM;
        rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
-       printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
+       printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, "
               "sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}) = %s\n",
               (int) bogus_fd, bogus_sev->sigev_value.sival_int,
               bogus_sev->sigev_value.sival_ptr, sprintrc(rc));
@@ -404,7 +404,7 @@ main(void)
        bogus_sev->sigev_un.sigev_thread.attribute =
                (unsigned long) 0xcafef00dfacefeedULL;
        rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
-       printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
+       printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, "
               "sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD, "
               "sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}) = "
               "%s\n",
index f13b7b040f9ec87354c69d6aaf743ad3ee65207a..1a2596271b787811d7032afd2b4e9ea19421a70c 100644 (file)
@@ -53,9 +53,9 @@ main(void)
        };
 
        syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL);
-       printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"
-              ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}"
-              ", NULL) = -1 %s (%m)\n",
+       printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, "
+              "sival_ptr=%#lx}, sigev_signo=%u, "
+              "sigev_notify=%#x /* SIGEV_??? */}, NULL) = -1 %s (%m)\n",
               sev.sigev_value.sival_int,
               sev.sigev_value.sival_ptr,
               sev.sigev_signo, sev.sigev_notify,
@@ -64,8 +64,9 @@ main(void)
        sev.sigev_notify = SIGEV_NONE;
        if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0]))
                perror_msg_and_skip("timer_create CLOCK_REALTIME");
-       printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"
-              ", sigev_signo=%u, sigev_notify=SIGEV_NONE}, [%d]) = 0\n",
+       printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, "
+              "sival_ptr=%#lx}, sigev_signo=%u, sigev_notify=SIGEV_NONE}, "
+              "[%d]) = 0\n",
               sev.sigev_value.sival_int,
               sev.sigev_value.sival_ptr,
               sev.sigev_signo, tid[0]);
@@ -74,9 +75,9 @@ main(void)
        sev.sigev_signo = SIGALRM;
        if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1]))
                perror_msg_and_skip("timer_create CLOCK_MONOTONIC");
-       printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}"
-              ", sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}"
-              ", [%d]) = 0\n",
+       printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, "
+              "sival_ptr=%#lx}, sigev_signo=SIGALRM, "
+              "sigev_notify=SIGEV_SIGNAL}, [%d]) = 0\n",
               sev.sigev_value.sival_int,
               sev.sigev_value.sival_ptr, tid[1]);
 
@@ -87,8 +88,8 @@ main(void)
                (unsigned long) 0xcafef00dfacefeedULL;
        if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2]))
                perror_msg_and_skip("timer_create CLOCK_REALTIME");
-       printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"
-              ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD"
+       printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, "
+              "sival_ptr=%#lx}, sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD"
               ", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}"
               ", [%d]) = 0\n",
               sev.sigev_value.sival_int,
@@ -104,9 +105,9 @@ main(void)
        sev.sigev_un.tid = getpid();
        if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3]))
                perror_msg_and_skip("timer_create CLOCK_MONOTONIC");
-       printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}"
-              ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD_ID"
-              ", sigev_notify_thread_id=%d}"
+       printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, "
+              "sival_ptr=%#lx}, sigev_signo=SIGALRM, "
+              "sigev_notify=SIGEV_THREAD_ID, sigev_notify_thread_id=%d}"
               ", [%d]) = 0\n",
               sev.sigev_value.sival_int,
               sev.sigev_value.sival_ptr,