aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-17 14:41:20 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-17 14:41:20 +0200
commit396a5d42f979c5200532937f3428d68e049b1298 (patch)
tree34d6fd297fba43d196adb0d386b9a602c6081a95 /src
parentMakefile fix (diff)
downloadlowbat-bsd-396a5d42f979c5200532937f3428d68e049b1298.tar.gz
lowbat-bsd-396a5d42f979c5200532937f3428d68e049b1298.tar.bz2
lowbat-bsd-396a5d42f979c5200532937f3428d68e049b1298.tar.xz
lowbat-bsd-396a5d42f979c5200532937f3428d68e049b1298.tar.zst
lowbat-bsd-396a5d42f979c5200532937f3428d68e049b1298.zip
Fetch percent is ok
Diffstat (limited to 'src')
-rw-r--r--src/jo_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jo_main.c b/src/jo_main.c
index 7ee0c83..f3e97f4 100644
--- a/src/jo_main.c
+++ b/src/jo_main.c
@@ -16,6 +16,7 @@
** Files prefixes
** --------------
** f: fetch
+** n: notify
*/
int
@@ -24,10 +25,11 @@ main(void)
int8_t status;
int8_t percent;
- if ((status = jo_f_status()) < 0) {
+ if ((status = jo_f_status()) == -2) {
return (JO_RET_RD_FAILED);
}
- if ((percent = jo_f_percent()) < 0) {
+ if ((percent = jo_f_percent()) == -3) {
+ printf("failed\n");
return (JO_RET_RD_FAILED);
}
printf("status: %hhd, %hhd%%\n", status, percent);