summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-01-14 13:05:55 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-01-14 13:06:02 -0500
commit943f2df0069cf615904c08cd92f3b72592cfafb1 (patch)
tree6a867f4aec5afbf59cb3e8590b2023126703dd60 /src/lib/ecore_drm
parent01dc2540db2b16ef9a0453ac632af9c58f956884 (diff)
ecore_drm/ecore_wl2: logging: remove errant usage of %m
Summary: printf %m stringifies and prints errno. I've tried to remove its use anywhere that the immediately preceding function might not set errno or is a complicated function for which knowing errno doesn't really give any useful information. I've left a few of the drmMode calls because they're just wrappers around ioctl, which legitimately sets errno. @fix Reviewers: zmike, devilhorns Reviewed By: zmike, devilhorns Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3572
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_device.c4
-rw-r--r--src/lib/ecore_drm/ecore_drm_evdev.c4
-rw-r--r--src/lib/ecore_drm/ecore_drm_fb.c4
-rw-r--r--src/lib/ecore_drm/ecore_drm_inputs.c6
-rw-r--r--src/lib/ecore_drm/ecore_drm_launcher.c2
-rw-r--r--src/lib/ecore_drm/ecore_drm_logind.c6
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c10
-rw-r--r--src/lib/ecore_drm/ecore_drm_tty.c2
8 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c
index a91af95..80cabf3 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -374,7 +374,7 @@ ecore_drm_device_open(Ecore_Drm_Device *dev)
374 /* try to create xkb context */ 374 /* try to create xkb context */
375 if (!(dev->xkb_ctx = _ecore_drm_device_cached_context_get(0))) 375 if (!(dev->xkb_ctx = _ecore_drm_device_cached_context_get(0)))
376 { 376 {
377 ERR("Failed to create xkb context: %m"); 377 ERR("Failed to create xkb context");
378 return EINA_FALSE; 378 return EINA_FALSE;
379 } 379 }
380 380
@@ -544,7 +544,7 @@ ecore_drm_device_software_setup(Ecore_Drm_Device *dev)
544 { 544 {
545 if (!(dev->dumb[i] = ecore_drm_fb_create(dev, w, h))) 545 if (!(dev->dumb[i] = ecore_drm_fb_create(dev, w, h)))
546 { 546 {
547 ERR("Could not create dumb framebuffer: %m"); 547 ERR("Could not create dumb framebuffer");
548 goto err; 548 goto err;
549 } 549 }
550 550
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c
index b2c2b99..35534f5 100644
--- a/src/lib/ecore_drm/ecore_drm_evdev.c
+++ b/src/lib/ecore_drm/ecore_drm_evdev.c
@@ -120,14 +120,14 @@ _device_keyboard_setup(Ecore_Drm_Evdev *edev)
120 edev->xkb.keymap = _ecore_drm_device_cached_keymap_get(input->dev->xkb_ctx, NULL, 0); 120 edev->xkb.keymap = _ecore_drm_device_cached_keymap_get(input->dev->xkb_ctx, NULL, 0);
121 if (!edev->xkb.keymap) 121 if (!edev->xkb.keymap)
122 { 122 {
123 ERR("Failed to create keymap: %m"); 123 ERR("Failed to create keymap");
124 return; 124 return;
125 } 125 }
126 126
127 /* create xkb state */ 127 /* create xkb state */
128 if (!(edev->xkb.state = xkb_state_new(edev->xkb.keymap))) 128 if (!(edev->xkb.state = xkb_state_new(edev->xkb.keymap)))
129 { 129 {
130 ERR("Failed to create xkb state: %m"); 130 ERR("Failed to create xkb state");
131 return; 131 return;
132 } 132 }
133 133
diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c
index 00c062a..234b06f 100644
--- a/src/lib/ecore_drm/ecore_drm_fb.c
+++ b/src/lib/ecore_drm/ecore_drm_fb.c
@@ -81,7 +81,7 @@ ecore_drm_fb_create(Ecore_Drm_Device *dev, int width, int height)
81 81
82 if (!_ecore_drm_fb_create2(dev->drm.fd, fb)) 82 if (!_ecore_drm_fb_create2(dev->drm.fd, fb))
83 { 83 {
84 WRN("Could not add framebuffer2: %m"); 84 WRN("Could not add framebuffer2");
85 if (drmModeAddFB(dev->drm.fd, fb->w, fb->h, 24, 32, 85 if (drmModeAddFB(dev->drm.fd, fb->w, fb->h, 24, 32,
86 fb->stride, fb->hdl, &fb->id)) 86 fb->stride, fb->hdl, &fb->id))
87 { 87 {
@@ -264,7 +264,7 @@ ecore_drm_fb_send(Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb, Ecore_Drm_Pageflip_Cb
264 ret = drmHandleEvent(dev->drm.fd, &dev->drm_ctx); 264 ret = drmHandleEvent(dev->drm.fd, &dev->drm_ctx);
265 if (ret < 0) 265 if (ret < 0)
266 { 266 {
267 ERR("drmHandleEvent Failed: %m"); 267 ERR("drmHandleEvent Failed");
268 free(cb); 268 free(cb);
269 break; 269 break;
270 } 270 }
diff --git a/src/lib/ecore_drm/ecore_drm_inputs.c b/src/lib/ecore_drm/ecore_drm_inputs.c
index df46b19..e3b5150 100644
--- a/src/lib/ecore_drm/ecore_drm_inputs.c
+++ b/src/lib/ecore_drm/ecore_drm_inputs.c
@@ -191,7 +191,7 @@ _cb_input_dispatch(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
191 if (!(input = data)) return EINA_TRUE; 191 if (!(input = data)) return EINA_TRUE;
192 192
193 if (libinput_dispatch(input->libinput) != 0) 193 if (libinput_dispatch(input->libinput) != 0)
194 ERR("Failed to dispatch libinput events: %m"); 194 ERR("Failed to dispatch libinput events");
195 195
196 /* process pending events */ 196 /* process pending events */
197 _input_events_process(input); 197 _input_events_process(input);
@@ -226,7 +226,7 @@ ecore_drm_inputs_create(Ecore_Drm_Device *dev)
226 libinput_udev_create_context(&_input_interface, input, eeze_udev_get()); 226 libinput_udev_create_context(&_input_interface, input, eeze_udev_get());
227 if (!input->libinput) 227 if (!input->libinput)
228 { 228 {
229 ERR("Could not create libinput context: %m"); 229 ERR("Could not create libinput context");
230 goto err; 230 goto err;
231 } 231 }
232 232
@@ -236,7 +236,7 @@ ecore_drm_inputs_create(Ecore_Drm_Device *dev)
236 /* assign udev seat */ 236 /* assign udev seat */
237 if (libinput_udev_assign_seat(input->libinput, dev->seat) != 0) 237 if (libinput_udev_assign_seat(input->libinput, dev->seat) != 0)
238 { 238 {
239 ERR("Failed to assign seat: %m"); 239 ERR("Failed to assign seat");
240 goto err; 240 goto err;
241 } 241 }
242 242
diff --git a/src/lib/ecore_drm/ecore_drm_launcher.c b/src/lib/ecore_drm/ecore_drm_launcher.c
index 6ba92ec..c9e1ce2 100644
--- a/src/lib/ecore_drm/ecore_drm_launcher.c
+++ b/src/lib/ecore_drm/ecore_drm_launcher.c
@@ -21,7 +21,7 @@ _ecore_drm_launcher_cb_vt_switch(void *data, int type EINA_UNUSED, void *event)
21 vt = (keycode - KEY_F1 + 1); 21 vt = (keycode - KEY_F1 + 1);
22 22
23 if (!_ecore_drm_tty_switch(dev, vt)) 23 if (!_ecore_drm_tty_switch(dev, vt))
24 ERR("Failed to activate vt: %m"); 24 ERR("Failed to activate vt");
25 } 25 }
26 26
27 return ECORE_CALLBACK_PASS_ON; 27 return ECORE_CALLBACK_PASS_ON;
diff --git a/src/lib/ecore_drm/ecore_drm_logind.c b/src/lib/ecore_drm/ecore_drm_logind.c
index 833e945..47cb92f 100644
--- a/src/lib/ecore_drm/ecore_drm_logind.c
+++ b/src/lib/ecore_drm/ecore_drm_logind.c
@@ -16,7 +16,7 @@ _ecore_drm_logind_vt_get(Ecore_Drm_Device *dev)
16 ret = sd_session_get_vt(dev->session, &dev->vt); 16 ret = sd_session_get_vt(dev->session, &dev->vt);
17 if (ret < 0) 17 if (ret < 0)
18 { 18 {
19 ERR("Could not get systemd tty: %m"); 19 ERR("Could not get systemd tty");
20 return EINA_FALSE; 20 return EINA_FALSE;
21 } 21 }
22 22
@@ -185,13 +185,13 @@ _ecore_drm_logind_connect(Ecore_Drm_Device *dev)
185 /* get session id */ 185 /* get session id */
186 if (sd_pid_get_session(getpid(), &dev->session) < 0) 186 if (sd_pid_get_session(getpid(), &dev->session) < 0)
187 { 187 {
188 ERR("Could not get systemd session: %m"); 188 ERR("Could not get systemd session");
189 return EINA_FALSE; 189 return EINA_FALSE;
190 } 190 }
191 191
192 if (sd_session_get_seat(dev->session, &seat) < 0) 192 if (sd_session_get_seat(dev->session, &seat) < 0)
193 { 193 {
194 ERR("Could not get systemd seat: %m"); 194 ERR("Could not get systemd seat");
195 return EINA_FALSE; 195 return EINA_FALSE;
196 } 196 }
197 else if (strcmp(dev->seat, seat)) 197 else if (strcmp(dev->seat, seat))
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index b0fdeb2..c5fed37 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -214,7 +214,7 @@ _ecore_drm_output_crtc_find(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConne
214 /* get the encoder on this connector */ 214 /* get the encoder on this connector */
215 if (!(enc = drmModeGetEncoder(dev->drm.fd, conn->encoders[j]))) 215 if (!(enc = drmModeGetEncoder(dev->drm.fd, conn->encoders[j])))
216 { 216 {
217 WRN("Failed to get encoder: %m"); 217 WRN("Failed to get encoder");
218 continue; 218 continue;
219 } 219 }
220 220
@@ -904,7 +904,7 @@ ecore_drm_outputs_create(Ecore_Drm_Device *dev)
904 /* get the resources */ 904 /* get the resources */
905 if (!(res = drmModeGetResources(dev->drm.fd))) 905 if (!(res = drmModeGetResources(dev->drm.fd)))
906 { 906 {
907 ERR("Could not get resources for drm card: %m"); 907 ERR("Could not get resources for drm card");
908 return EINA_FALSE; 908 return EINA_FALSE;
909 } 909 }
910 910
@@ -1081,7 +1081,7 @@ ecore_drm_output_repaint(Ecore_Drm_Output *output)
1081 1081
1082 vbl.request.signal = (unsigned long)sprite; 1082 vbl.request.signal = (unsigned long)sprite;
1083 ret = drmWaitVBlank(dev->drm.fd, &vbl); 1083 ret = drmWaitVBlank(dev->drm.fd, &vbl);
1084 if (ret) ERR("Error Wait VBlank: %m"); 1084 if (ret) ERR("Error Wait VBlank");
1085 1085
1086 sprite->output = output; 1086 sprite->output = output;
1087 output->pending_vblank = EINA_TRUE; 1087 output->pending_vblank = EINA_TRUE;
@@ -1384,7 +1384,7 @@ ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsigned int crtc)
1384 /* get the resources */ 1384 /* get the resources */
1385 if (!(res = drmModeGetResources(dev->drm.fd))) 1385 if (!(res = drmModeGetResources(dev->drm.fd)))
1386 { 1386 {
1387 ERR("Could not get resources for drm card: %m"); 1387 ERR("Could not get resources for drm card");
1388 return EINA_FALSE; 1388 return EINA_FALSE;
1389 } 1389 }
1390 1390
@@ -1399,7 +1399,7 @@ ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsigned int crtc)
1399 /* get the encoder on this connector */ 1399 /* get the encoder on this connector */
1400 if (!(enc = drmModeGetEncoder(dev->drm.fd, conn->encoders[j]))) 1400 if (!(enc = drmModeGetEncoder(dev->drm.fd, conn->encoders[j])))
1401 { 1401 {
1402 WRN("Failed to get encoder: %m"); 1402 WRN("Failed to get encoder");
1403 continue; 1403 continue;
1404 } 1404 }
1405 1405
diff --git a/src/lib/ecore_drm/ecore_drm_tty.c b/src/lib/ecore_drm/ecore_drm_tty.c
index fdc2bcd..f88cb4b 100644
--- a/src/lib/ecore_drm/ecore_drm_tty.c
+++ b/src/lib/ecore_drm/ecore_drm_tty.c
@@ -57,7 +57,7 @@ _ecore_drm_tty_setup(Ecore_Drm_Device *dev)
57 if ((fstat(dev->tty.fd, &st) == -1) || 57 if ((fstat(dev->tty.fd, &st) == -1) ||
58 (major(st.st_rdev) != TTY_MAJOR) || (minor(st.st_rdev) == 0)) 58 (major(st.st_rdev) != TTY_MAJOR) || (minor(st.st_rdev) == 0))
59 { 59 {
60 ERR("Failed to get stats for tty: %m"); 60 ERR("Failed to get stats for tty");
61 return EINA_FALSE; 61 return EINA_FALSE;
62 } 62 }
63 63