OSDN Git Service
(root)
/
pinky-bar
/
pinky-bar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
448a2f7
)
Update linux_functions.c
author
su8
<coyim@nypato.com>
Sat, 18 Nov 2017 15:05:26 +0000
(17:05 +0200)
committer
GitHub
<noreply@github.com>
Sat, 18 Nov 2017 15:05:26 +0000
(17:05 +0200)
src/linux_functions.c
patch
|
blob
|
history
diff --git
a/src/linux_functions.c
b/src/linux_functions.c
index
003b71a
..
0c58e1f
100644
(file)
--- a/
src/linux_functions.c
+++ b/
src/linux_functions.c
@@
-351,7
+351,8
@@
get_battery(char *str1) {
BATTERY_TOTAL(temp, num);
if (NULL == (fp = fopen(temp, "r"))) {
- exit_with_err(CANNOT_OPEN, "BAT0 and BAT1");
+ *str1++ = '0';
+ return;
}
}