Changeset 6c51e62 in rtems-libbsd


Ignore:
Timestamp:
Sep 25, 2018, 7:57:43 AM (7 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
b42dea9
Parents:
7aba2a4
git-author:
Sebastian Huber <sebastian.huber@…> (09/25/18 07:57:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/25/18 07:59:59)
Message:

media01: Improve output messages

Use a single printf() call to avoid interference from other output. Do
not print the listener argument.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuite/media01/test_main.c

    r7aba2a4 r6c51e62  
    7676    const char *src, const char *dest, void *arg)
    7777{
     78        if (dest == NULL) {
     79                dest = "NULL";
     80        }
     81
    7882        printf(
    79                 "media listener: event = %s, state = %s, src = %s",
     83                "media listener: event = %s, state = %s, src = %s, dest = %s\n",
    8084                rtems_media_event_description(event),
    8185                rtems_media_state_description(state),
    82                 src
     86                src,
     87                dest
    8388        );
    84 
    85         if (dest != NULL) {
    86                 printf(", dest = %s", dest);
    87         }
    88 
    89         if (arg != NULL) {
    90                 printf(", arg = %p\n", arg);
    91         }
    92 
    93         printf("\n");
    9489
    9590        if (event == RTEMS_MEDIA_EVENT_MOUNT && state == RTEMS_MEDIA_STATE_SUCCESS) {
Note: See TracChangeset for help on using the changeset viewer.