From a38e4cd618be147f4b1b302e802bf7a1bce99bde Mon Sep 17 00:00:00 2001 From: Miguel BarĂ£o Date: Fri, 24 Jun 2022 17:29:14 +0100 Subject: [PATCH] Changed perror to puts so that error appears --- battery | Bin 15448 -> 0 bytes battery.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/battery b/battery index 0ef8ac8..a30199b 100755 Binary files a/battery and b/battery differ diff --git a/battery.c b/battery.c index 7d3a226..74e15db 100644 --- a/battery.c +++ b/battery.c @@ -23,7 +23,7 @@ int main() { if (sysctlbyname("hw.acpi.battery.state", &state, &len, NULL, 0) || sysctlbyname("hw.acpi.battery.life", &life, &len, NULL, 0)) { - perror("No battery?"); + puts("(no battery)"); exit(EXIT_FAILURE); } -- libgit2 0.21.2