summaryrefslogtreecommitdiff
path: root/src/bootchart
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:09:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:17:51 +0100
commitc33b329709ebe2755181980a050d02ec7c81ed87 (patch)
tree39080c428c72c90daddbe1c08d45c181adf1476c /src/bootchart
parent5567fafbc9d83a1391f23ecdbe698a3c03929370 (diff)
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.
Diffstat (limited to 'src/bootchart')
-rw-r--r--src/bootchart/bootchart.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index f025c76fb6..35c15ab12e 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -194,8 +194,8 @@ static int parse_argv(int argc, char *argv[]) {
case 'f':
r = safe_atod(optarg, &arg_hz);
if (r < 0)
- log_warning("failed to parse --freq/-f argument '%s': %s",
- optarg, strerror(-r));
+ log_warning_errno(r, "failed to parse --freq/-f argument '%s': %m",
+ optarg);
break;
case 'F':
arg_filter = false;
@@ -209,8 +209,8 @@ static int parse_argv(int argc, char *argv[]) {
case 'n':
r = safe_atoi(optarg, &arg_samples_len);
if (r < 0)
- log_warning("failed to parse --samples/-n argument '%s': %s",
- optarg, strerror(-r));
+ log_warning_errno(r, "failed to parse --samples/-n argument '%s': %m",
+ optarg);
break;
case 'o':
path_kill_slashes(optarg);
@@ -226,14 +226,14 @@ static int parse_argv(int argc, char *argv[]) {
case 'x':
r = safe_atod(optarg, &arg_scale_x);
if (r < 0)
- log_warning("failed to parse --scale-x/-x argument '%s': %s",
- optarg, strerror(-r));
+ log_warning_errno(r, "failed to parse --scale-x/-x argument '%s': %m",
+ optarg);
break;
case 'y':
r = safe_atod(optarg, &arg_scale_y);
if (r < 0)
- log_warning("failed to parse --scale-y/-y argument '%s': %s",
- optarg, strerror(-r));
+ log_warning_errno(r, "failed to parse --scale-y/-y argument '%s': %m",
+ optarg);
break;
case 'e':
arg_entropy = true;