diff options
author | grog <grog@FreeBSD.org> | 2007-12-30 22:02:50 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2007-12-30 22:02:50 +0000 |
commit | 0abc02edc2f3781da921c01b9d740caacfe14b12 (patch) | |
tree | 4e44c94607c359542cef984d28aa73de57ad0693 /usr.bin/calendar | |
parent | fac9c01c237e49ddbc0359b9f037f18b883a0e10 (diff) | |
download | FreeBSD-src-0abc02edc2f3781da921c01b9d740caacfe14b12.zip FreeBSD-src-0abc02edc2f3781da921c01b9d740caacfe14b12.tar.gz |
If we can't open a calendar file, don't guess why. Check the error
return and print a useful message.
Prior to this commit, access problems could give rise to messages that
the file didn't exist.
Diffstat (limited to 'usr.bin/calendar')
-rw-r--r-- | usr.bin/calendar/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 49bfa53..6eb39f9 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -349,7 +349,8 @@ opencal(void) break; } if (!found) - errx(1, "no calendar file: ``%s''", calendarFile); + errx(1, "can't open calendar file \"%s\": %s (%d)", + calendarFile, strerror (errno), errno); } } if (pipe(pdes) < 0) |