Commit 5802cb25 authored by Jerry Hoemann's avatar Jerry Hoemann Committed by Greg Kroah-Hartman

selftests: watchdog: Fix error message.

[ Upstream commit 04d5e4bd ]

Printf's say errno but print the string version of error.
Make consistent.
Signed-off-by: default avatarJerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: default avatarShuah Khan (Samsung OSG) <shuah@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 74685702
......@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
printf("Last boot is caused by: %s.\n", (flags != 0) ?
"Watchdog" : "Power-On-Reset");
else
printf("WDIOC_GETBOOTSTATUS errno '%s'\n", strerror(errno));
printf("WDIOC_GETBOOTSTATUS error '%s'\n", strerror(errno));
break;
case 'd':
flags = WDIOS_DISABLECARD;
......@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
if (!ret)
printf("Watchdog card disabled.\n");
else
printf("WDIOS_DISABLECARD errno '%s'\n", strerror(errno));
printf("WDIOS_DISABLECARD error '%s'\n", strerror(errno));
break;
case 'e':
flags = WDIOS_ENABLECARD;
......@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
if (!ret)
printf("Watchdog card enabled.\n");
else
printf("WDIOS_ENABLECARD errno '%s'\n", strerror(errno));
printf("WDIOS_ENABLECARD error '%s'\n", strerror(errno));
break;
case 'p':
ping_rate = strtoul(optarg, NULL, 0);
......@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
if (!ret)
printf("Watchdog timeout set to %u seconds.\n", flags);
else
printf("WDIOC_SETTIMEOUT errno '%s'\n", strerror(errno));
printf("WDIOC_SETTIMEOUT error '%s'\n", strerror(errno));
break;
default:
usage(argv[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment