diff options
author | Jerry Hoemann <jerry.hoemann@hpe.com> | 2018-09-26 17:23:08 -0400 |
---|---|---|
committer | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-10-24 16:49:36 -0400 |
commit | 04d5e4bd37516ad60854eb74592c7dbddd75d277 (patch) | |
tree | 93a1b9c0c3f2e7ad18a68d8d25c60ec87eaaacaf /tools/testing | |
parent | 9a244229a4b850b11952a0df79607c69b18fd8df (diff) |
selftests: watchdog: Fix error message.
Printf's say errno but print the string version of error.
Make consistent.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/watchdog/watchdog-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c index e029e2017280..f1c6e025cbe5 100644 --- a/tools/testing/selftests/watchdog/watchdog-test.c +++ b/tools/testing/selftests/watchdog/watchdog-test.c | |||
@@ -109,7 +109,7 @@ int main(int argc, char *argv[]) | |||
109 | printf("Last boot is caused by: %s.\n", (flags != 0) ? | 109 | printf("Last boot is caused by: %s.\n", (flags != 0) ? |
110 | "Watchdog" : "Power-On-Reset"); | 110 | "Watchdog" : "Power-On-Reset"); |
111 | else | 111 | else |
112 | printf("WDIOC_GETBOOTSTATUS errno '%s'\n", strerror(errno)); | 112 | printf("WDIOC_GETBOOTSTATUS error '%s'\n", strerror(errno)); |
113 | break; | 113 | break; |
114 | case 'd': | 114 | case 'd': |
115 | flags = WDIOS_DISABLECARD; | 115 | flags = WDIOS_DISABLECARD; |
@@ -117,7 +117,7 @@ int main(int argc, char *argv[]) | |||
117 | if (!ret) | 117 | if (!ret) |
118 | printf("Watchdog card disabled.\n"); | 118 | printf("Watchdog card disabled.\n"); |
119 | else | 119 | else |
120 | printf("WDIOS_DISABLECARD errno '%s'\n", strerror(errno)); | 120 | printf("WDIOS_DISABLECARD error '%s'\n", strerror(errno)); |
121 | break; | 121 | break; |
122 | case 'e': | 122 | case 'e': |
123 | flags = WDIOS_ENABLECARD; | 123 | flags = WDIOS_ENABLECARD; |
@@ -125,7 +125,7 @@ int main(int argc, char *argv[]) | |||
125 | if (!ret) | 125 | if (!ret) |
126 | printf("Watchdog card enabled.\n"); | 126 | printf("Watchdog card enabled.\n"); |
127 | else | 127 | else |
128 | printf("WDIOS_ENABLECARD errno '%s'\n", strerror(errno)); | 128 | printf("WDIOS_ENABLECARD error '%s'\n", strerror(errno)); |
129 | break; | 129 | break; |
130 | case 'p': | 130 | case 'p': |
131 | ping_rate = strtoul(optarg, NULL, 0); | 131 | ping_rate = strtoul(optarg, NULL, 0); |
@@ -139,7 +139,7 @@ int main(int argc, char *argv[]) | |||
139 | if (!ret) | 139 | if (!ret) |
140 | printf("Watchdog timeout set to %u seconds.\n", flags); | 140 | printf("Watchdog timeout set to %u seconds.\n", flags); |
141 | else | 141 | else |
142 | printf("WDIOC_SETTIMEOUT errno '%s'\n", strerror(errno)); | 142 | printf("WDIOC_SETTIMEOUT error '%s'\n", strerror(errno)); |
143 | break; | 143 | break; |
144 | default: | 144 | default: |
145 | usage(argv[0]); | 145 | usage(argv[0]); |