Changeset 133 in flair-src for trunk/lib/FlairCore/src/ui_com.cpp


Ignore:
Timestamp:
Feb 9, 2017, 11:08:31 AM (5 years ago)
Author:
Sanahuja Guillaume
Message:

modif sterror

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/ui_com.cpp

    r15 r133  
    7070
    7171  if (status != 0) {
    72     Err("rt_pipe_create error (%s)\n", strerror(-status));
     72                char errorMsg[256];
     73    Err("rt_pipe_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    7374    // return -1;
    7475  }
     
    125126
    126127  int status = rt_pipe_delete(&pipe);
    127   if (status != 0)
    128     Err("rt_pipe_delete error (%s)\n", strerror(-status));
     128  if (status != 0) {
     129                char errorMsg[256];
     130    Err("rt_pipe_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     131        }
    129132#endif
    130133
     
    160163
    161164  if (nb_write < 0) {
    162     Err("rt_pipe_write error (%s)\n", strerror(-nb_write));
     165                char errorMsg[256];
     166    Err("rt_pipe_write error (%s)\n", strerror_r(-nb_write, errorMsg, sizeof(errorMsg)));
    163167  } else if (nb_write != size) {
    164168    Err("rt_pipe_write error %i/%i\n", nb_write, size);
     
    326330  while (pipe_fd < 0) {
    327331    pipe_fd = open(devname.c_str(), O_RDWR);
    328     if (pipe_fd < 0 && errno != ENOENT)
    329       caller->Err("open pipe_fd error (%s)\n", strerror(-errno));
     332    if (pipe_fd < 0 && errno != ENOENT) {
     333                        char errorMsg[256];
     334      caller->Err("open pipe_fd error (%s)\n", strerror_r(errno, errorMsg, sizeof(errorMsg)));
     335                }
    330336    usleep(1000);
    331337  }
Note: See TracChangeset for help on using the changeset viewer.