summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2018-02-23 15:28:27 -0500
committerJune McEnroe <programble@gmail.com>2018-02-23 15:28:27 -0500
commit213dea3c6bc6c0ca1348812d9c55041bb8539907 (patch)
tree580309c07010901f4cad83aff90b424217d9d09c
parentClean up dtch (again, probably) (diff)
downloadsrc-213dea3c6bc6c0ca1348812d9c55041bb8539907.tar.gz
src-213dea3c6bc6c0ca1348812d9c55041bb8539907.zip
Tweak fbatt exit codes
-rw-r--r--bin/fbatt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/fbatt.c b/bin/fbatt.c
index a775ff49..6c0052e4 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);