treewide: more log_*_errno() conversions, multiline calls

Basically:

find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
 local $_=<>;
 s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \
 $f; done

Plus manual indentation fixups.
This commit is contained in:
Michal Schmidt
2014-11-28 17:17:51 +01:00
parent 5567fafbc9
commit c33b329709
40 changed files with 232 additions and 278 deletions
+2 -4
View File
@@ -93,13 +93,11 @@ int loopback_setup(void) {
r = start_loopback(rtnl);
if (r == -EPERM) {
if (check_loopback() < 0) {
log_warning("Failed to configure loopback device: %s",
strerror(EPERM));
log_warning_errno(EPERM, "Failed to configure loopback device: %m");
return -EPERM;
}
} else if (r < 0) {
log_warning("Failed to configure loopback device: %s",
strerror(-r));
log_warning_errno(r, "Failed to configure loopback device: %m");
return r;
}