commit 948f29c95a4e9883148b062319e013c879dea285
parent 02e0d687ee89ca32cd33a9adaa7a5a856908aa36
Author: Sridaran Thoniyil <sri7thon@gmail.com>
Date: Fri, 8 May 2020 11:01:22 -0400
Add panic if battery cannot be opened
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/paleofetch.c b/paleofetch.c
@@ -241,6 +241,9 @@ static char *get_battery_percentage() {
fclose(battery_status_file);
}
+ else {
+ halt_and_catch_fire("unable to get battery information");
+ }
fclose(battery_percentage_file);
return battery_percentage;