diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-09-14 11:17:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-14 11:17:58 +0200 |
commit | 2d88def9593b9809c71039bee67bea150ddd3598 (patch) | |
tree | bc03e083cf558d286141b24bc72c1855325efd73 /src/hostname/hostnamed.c | |
parent | 34210af7c63640fca1fd4a09fc23b01a8cd70bf3 (diff) | |
parent | e031c227cbbe7243212ecb38a6db105a93655eae (diff) |
Merge pull request #4133 from keszybz/strerror-removal
Strerror removal and other janitorial cleanups
Diffstat (limited to 'src/hostname/hostnamed.c')
-rw-r--r-- | src/hostname/hostnamed.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 080a2cd138..197f905b7d 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -451,7 +451,7 @@ static int method_set_hostname(sd_bus_message *m, void *userdata, sd_bus_error * r = context_update_kernel_hostname(c); if (r < 0) { log_error_errno(r, "Failed to set host name: %m"); - return sd_bus_error_set_errnof(error, r, "Failed to set hostname: %s", strerror(-r)); + return sd_bus_error_set_errnof(error, r, "Failed to set hostname: %m"); } log_info("Changed host name to '%s'", strna(c->data[PROP_HOSTNAME])); @@ -512,13 +512,13 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ r = context_update_kernel_hostname(c); if (r < 0) { log_error_errno(r, "Failed to set host name: %m"); - return sd_bus_error_set_errnof(error, r, "Failed to set hostname: %s", strerror(-r)); + return sd_bus_error_set_errnof(error, r, "Failed to set hostname: %m"); } r = context_write_data_static_hostname(c); if (r < 0) { log_error_errno(r, "Failed to write static host name: %m"); - return sd_bus_error_set_errnof(error, r, "Failed to set static hostname: %s", strerror(-r)); + return sd_bus_error_set_errnof(error, r, "Failed to set static hostname: %m"); } log_info("Changed static host name to '%s'", strna(c->data[PROP_STATIC_HOSTNAME])); @@ -593,7 +593,7 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess r = context_write_data_machine_info(c); if (r < 0) { log_error_errno(r, "Failed to write machine info: %m"); - return sd_bus_error_set_errnof(error, r, "Failed to write machine info: %s", strerror(-r)); + return sd_bus_error_set_errnof(error, r, "Failed to write machine info: %m"); } log_info("Changed %s to '%s'", |