From 213dea3c6bc6c0ca1348812d9c55041bb8539907 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Fri, 23 Feb 2018 15:28:27 -0500 Subject: Tweak fbatt exit codes --- bin/fbatt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') 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); -- cgit 1.4.1