Remove inappropriate usage of %m
Summary: printf %m stringifies and prints errno. This is actually hugely confusing if used in error messages after failures that don't set errno. You may get "Success", or you may get an errno that was harmless ages ago. Some of the functions followed by %m have only some error paths that set errno, or make multiple system calls that can set errno independently - knowing the errno at failure time is unlikely to be useful in these cases. Reviewers: devilhorns, zmike Reviewed By: zmike Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3571
This commit is contained in:
parent
35ae02a524
commit
3304ea7b6c
|
@ -427,7 +427,7 @@ _e_alert_drm_create(void)
|
|||
einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas);
|
||||
if (!einfo)
|
||||
{
|
||||
printf("\tFailed to get evas engine info: %m\n");
|
||||
printf("\tFailed to get evas engine info\n");
|
||||
evas_free(canvas);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1636,7 +1636,7 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED,
|
|||
wl_resource_create(client, &wl_compositor_interface,
|
||||
version, id)))
|
||||
{
|
||||
ERR("Could not create compositor resource: %m");
|
||||
ERR("Could not create compositor resource");
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
@ -2074,7 +2074,7 @@ _e_comp_wl_subcompositor_cb_bind(struct wl_client *client, void *data EINA_UNUSE
|
|||
wl_resource_create(client, &wl_subcompositor_interface,
|
||||
version, id)))
|
||||
{
|
||||
ERR("Could not create subcompositor resource: %m");
|
||||
ERR("Could not create subcompositor resource");
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
@ -2184,7 +2184,7 @@ _e_comp_wl_screenshooter_cb_bind(struct wl_client *client, void *data, uint32_t
|
|||
res = wl_resource_create(client, &screenshooter_interface, 1, id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create screenshooter resource: %m");
|
||||
ERR("Could not create screenshooter resource");
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
@ -2531,7 +2531,7 @@ _e_comp_wl_compositor_create(void)
|
|||
/* create new compositor data */
|
||||
if (!(cdata = E_NEW(E_Comp_Wl_Data, 1)))
|
||||
{
|
||||
ERR("Could not create compositor data: %m");
|
||||
ERR("Could not create compositor data");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -2545,7 +2545,7 @@ _e_comp_wl_compositor_create(void)
|
|||
cdata->ewd = ecore_wl2_display_create(NULL);
|
||||
if (!cdata->ewd)
|
||||
{
|
||||
ERR("Could not create a Wayland display: %m");
|
||||
ERR("Could not create a Wayland display");
|
||||
free(cdata);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
@ -2553,7 +2553,7 @@ _e_comp_wl_compositor_create(void)
|
|||
cdata->wl.disp = ecore_wl2_display_get(cdata->ewd);
|
||||
if (!cdata->wl.disp)
|
||||
{
|
||||
ERR("Could not create a Wayland display: %m");
|
||||
ERR("Could not create a Wayland display");
|
||||
goto disp_err;
|
||||
}
|
||||
|
||||
|
@ -2572,7 +2572,7 @@ _e_comp_wl_compositor_create(void)
|
|||
COMPOSITOR_VERSION, e_comp,
|
||||
_e_comp_wl_compositor_cb_bind))
|
||||
{
|
||||
ERR("Could not add compositor to wayland globals: %m");
|
||||
ERR("Could not add compositor to wayland globals");
|
||||
goto comp_global_err;
|
||||
}
|
||||
|
||||
|
@ -2580,7 +2580,7 @@ _e_comp_wl_compositor_create(void)
|
|||
if (!wl_global_create(cdata->wl.disp, &wl_subcompositor_interface, 1,
|
||||
e_comp, _e_comp_wl_subcompositor_cb_bind))
|
||||
{
|
||||
ERR("Could not add subcompositor to wayland globals: %m");
|
||||
ERR("Could not add subcompositor to wayland globals");
|
||||
goto comp_global_err;
|
||||
}
|
||||
|
||||
|
@ -2588,7 +2588,7 @@ _e_comp_wl_compositor_create(void)
|
|||
if (!wl_global_create(cdata->wl.disp, &zwp_e_session_recovery_interface, 1,
|
||||
e_comp, _e_comp_wl_session_recovery_cb_bind))
|
||||
{
|
||||
ERR("Could not add session_recovery to wayland globals: %m");
|
||||
ERR("Could not add session_recovery to wayland globals");
|
||||
goto comp_global_err;
|
||||
}
|
||||
|
||||
|
@ -2600,7 +2600,7 @@ _e_comp_wl_compositor_create(void)
|
|||
e_comp, _e_comp_wl_screenshooter_cb_bind);
|
||||
if (!cdata->screenshooter.global)
|
||||
{
|
||||
ERR("Could not create screenshooter global: %m");
|
||||
ERR("Could not create screenshooter global");
|
||||
goto comp_global_err;
|
||||
}
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ _e_comp_wl_data_manager_cb_device_get(struct wl_client *client, struct wl_resour
|
|||
res = wl_resource_create(client, &wl_data_device_interface, 1, id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create data device resource: %m");
|
||||
ERR("Could not create data device resource");
|
||||
wl_resource_post_no_memory(manager_resource);
|
||||
return;
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ _e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data EINA_UNUSED
|
|||
wl_resource_create(client, &wl_data_device_manager_interface, 1, id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create data device manager: %m");
|
||||
ERR("Could not create data device manager");
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
@ -835,7 +835,7 @@ e_comp_wl_data_manager_init(void)
|
|||
e_comp->wl_comp_data, _e_comp_wl_data_cb_bind_manager);
|
||||
if (!e_comp_wl->mgr.global)
|
||||
{
|
||||
ERR("Could not create global for data device manager: %m");
|
||||
ERR("Could not create global for data device manager");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -887,7 +887,7 @@ e_comp_wl_data_manager_source_create(struct wl_client *client, struct wl_resourc
|
|||
wl_resource_create(client, &wl_data_source_interface, 1, id);
|
||||
if (!source->resource)
|
||||
{
|
||||
ERR("Could not create data source resource: %m");
|
||||
ERR("Could not create data source resource");
|
||||
free(source);
|
||||
wl_resource_post_no_memory(resource);
|
||||
return NULL;
|
||||
|
|
|
@ -107,7 +107,7 @@ _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *re
|
|||
wl_resource_get_version(resource), id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create pointer on seat %s: %m",
|
||||
ERR("Could not create pointer on seat %s",
|
||||
e_comp_wl->seat.name);
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
|
@ -176,7 +176,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
|
|||
wl_resource_get_version(resource), id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create keyboard on seat %s: %m", e_comp_wl->seat.name);
|
||||
ERR("Could not create keyboard on seat %s", e_comp_wl->seat.name);
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ _e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_re
|
|||
wl_resource_get_version(resource), id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create touch on seat %s: %m",
|
||||
ERR("Could not create touch on seat %s",
|
||||
e_comp_wl->seat.name);
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
|
@ -257,7 +257,7 @@ _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data EINA_UNUSED,
|
|||
res = wl_resource_create(client, &wl_seat_interface, version, id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create seat resource: %m");
|
||||
ERR("Could not create seat resource");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -429,7 +429,7 @@ e_comp_wl_input_init(void)
|
|||
e_comp->wl_comp_data, _e_comp_wl_input_cb_bind_seat);
|
||||
if (!e_comp_wl->seat.global)
|
||||
{
|
||||
ERR("Could not create global for seat: %m");
|
||||
ERR("Could not create global for seat");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1394,7 +1394,7 @@ e_modapi_init(E_Module *m)
|
|||
if (!wl_global_create(e_comp_wl->wl.disp, &wl_shell_interface, 1,
|
||||
e_comp->wl_comp_data, _e_shell_cb_bind))
|
||||
{
|
||||
ERR("Could not create shell global: %m");
|
||||
ERR("Could not create shell global");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1402,7 +1402,7 @@ e_modapi_init(E_Module *m)
|
|||
if (!wl_global_create(e_comp_wl->wl.disp, &xdg_shell_interface, 1,
|
||||
e_comp->wl_comp_data, _e_xdg_shell_cb_bind))
|
||||
{
|
||||
ERR("Could not create xdg_shell global: %m");
|
||||
ERR("Could not create xdg_shell global");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue