all: replace g_strerror() calls with nm_strerror_native()

This commit is contained in:
Thomas Haller
2019-01-31 17:08:03 +01:00
parent 737ab51472
commit a4fb6ddfca
26 changed files with 84 additions and 84 deletions

View File

@@ -130,13 +130,13 @@ nm_main_utils_ensure_statedir ()
&& parent[1] != '\0'
&& g_mkdir_with_parents (parent, 0755) != 0) {
errsv = errno;
fprintf (stderr, "Cannot create parents for '%s': %s", NMSTATEDIR, g_strerror (errsv));
fprintf (stderr, "Cannot create parents for '%s': %s", NMSTATEDIR, nm_strerror_native (errsv));
exit (1);
}
/* Ensure state directory exists */
if (g_mkdir_with_parents (NMSTATEDIR, 0700) != 0) {
errsv = errno;
fprintf (stderr, "Cannot create '%s': %s", NMSTATEDIR, g_strerror (errsv));
fprintf (stderr, "Cannot create '%s': %s", NMSTATEDIR, nm_strerror_native (errsv));
exit (1);
}
}
@@ -149,7 +149,7 @@ nm_main_utils_ensure_rundir ()
/* Setup runtime directory */
if (g_mkdir_with_parents (NMRUNDIR, 0755) != 0) {
errsv = errno;
fprintf (stderr, _("Cannot create '%s': %s"), NMRUNDIR, g_strerror (errsv));
fprintf (stderr, _("Cannot create '%s': %s"), NMRUNDIR, nm_strerror_native (errsv));
exit (1);
}
@@ -160,7 +160,7 @@ nm_main_utils_ensure_rundir ()
if (g_mkdir (NM_CONFIG_DEVICE_STATE_DIR, 0755) != 0) {
errsv = errno;
if (errsv != EEXIST) {
fprintf (stderr, _("Cannot create '%s': %s"), NM_CONFIG_DEVICE_STATE_DIR, g_strerror (errsv));
fprintf (stderr, _("Cannot create '%s': %s"), NM_CONFIG_DEVICE_STATE_DIR, nm_strerror_native (errsv));
exit (1);
}
}