{
uint32_t i;
int nread;
- char buf[128];
struct input_event ev[EVENT_MAX];
evdev_device_info_t *device_info = (evdev_device_info_t *)data;
return 0;
nread = read(fd, &ev, sizeof(ev));
- PEPPER_CHECK(nread>=0, return 0, "[%s] Failed on reading given fd. (error : %s, fd:%d)\n",
- __FUNCTION__, strerror_r(errno, buf, 128), fd);
+ PEPPER_CHECK(nread>=0, return 0, "[%s] Failed on reading given fd. (error msg : %m, fd:%d)\n",
+ __FUNCTION__, fd);
for (i = 0 ; i < (nread / sizeof(ev[0])); i++)
{
{
uint32_t i;
int nread;
- char buf[128];
struct inotify_event ev[32];
pepper_inotify_watch_t *watch_data = data;
nread = read(fd, &ev, sizeof(ev));
PEPPER_CHECK(nread >= 0, return 0,
- "Failed on reading given fd. (error : %s, fd:%d)\n",
- strerror_r(errno, buf, 128), fd);
+ "Failed on reading given fd. (error msg : %m, fd:%d)\n", fd);
for (i = 0 ; i < (nread / sizeof(ev[0])); i++) {
if (ev[i].wd == watch_data->wd)
pepper_inotify_add(pepper_inotify_t *inotify, const char *path)
{
pepper_inotify_watch_t *watch_data;
- char buf[128];
PEPPER_CHECK(inotify, return PEPPER_FALSE, "Invalid pepper_inotify_t object\n");
PEPPER_CHECK(path, return PEPPER_FALSE, "Invalid path\n");
watch_data->wd = inotify_add_watch(inotify->fd, path,
IN_MODIFY | IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO | IN_MOVE_SELF);
PEPPER_CHECK(watch_data->wd >= 0, goto failed,
- "Failed to add watch for %s\n", path, strerror_r(errno, buf, 128));
+ "Failed to add watch for %s (error msg:%m)\n", path);
strncpy(watch_data->path, path, MAX_PATH_LEN - 1);
PEPPER_CHECK(pepper_keyrouter->opts, return, "Failed to alloc memory for options\n") ;
file = fopen(KEYLAYOUT_DIR, "r");
- PEPPER_CHECK(file, goto finish, "Failed to open key layout file(%s): (errno: %s)\n", KEYLAYOUT_DIR, strerror(errno));
+ PEPPER_CHECK(file, goto finish, "Failed to open key layout file(%s): (err msg: %m)\n", KEYLAYOUT_DIR);
while (!feof(file)) {
ret = fgets(buf, 1024, file);