summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-02-23 15:28:27 -0500
committerJune McEnroe <june@causal.agency>2018-02-23 15:28:27 -0500
commit671a80136c2ea81681c1f323b2faa640c1b2505c (patch)
tree19c2555c9e965387f1f4292a91f89868f90fa029
parentClean up dtch (again, probably) (diff)
downloadsrc-671a80136c2ea81681c1f323b2faa640c1b2505c.tar.gz
src-671a80136c2ea81681c1f323b2faa640c1b2505c.zip
Tweak fbatt exit codes
Diffstat (limited to '')
-rw-r--r--bin/fbatt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/fbatt.c b/bin/fbatt.c
index 5b0180ea..eb736acc 100644
--- a/bin/fbatt.c
+++ b/bin/fbatt.c
@@ -53,18 +53,18 @@ int main() {
         if (entry->d_name[0] == '.') continue;
 
         error = chdir(CLASS);
-        if (error) err(EX_IOERR, "%s", CLASS);
+        if (error) err(EX_OSFILE, "%s", CLASS);
 
         error = chdir(entry->d_name);
-        if (error) err(EX_IOERR, "%s/%s", CLASS, entry->d_name);
+        if (error) err(EX_OSFILE, "%s/%s", CLASS, entry->d_name);
 
         chargeFull = fopen("charge_full", "r");
         chargeNow = fopen("charge_now", "r");
         if (chargeFull && chargeNow) break;
     }
     if (!chargeFull || !chargeNow) {
-        if (errno) err(EX_IOERR, "%s", CLASS);
-        errx(EX_CONFIG, "empty %s", CLASS);
+        if (errno) err(EX_OSFILE, "%s", CLASS);
+        errx(EX_CONFIG, "%s: empty", CLASS);
     }
     closedir(dir);
 
mit/bin/hi.c?id=5db911d0071344fac493feed9a5721bdda770b89&follow=1'>Improve C syntax accuracy and add Format classJune McEnroe 2019-02-07Factor out hi checkJune McEnroe Fix subexpression bounds check and compile pattends. 2019-02-07Add Escape class to hiJune McEnroe 2019-02-07Add Todo class and parent syntax constraintJune McEnroe