From a057243ef11e64a9659ff5f5a96cd3b14777dafc Mon Sep 17 00:00:00 2001 From: Tharre Date: Mon, 24 Nov 2014 21:47:23 +0100 Subject: Rename diem to fatal to further confuse matters. It's actually pretty easy now, fatal() is used as a short cut for appending the strerror'd errno, while die() is just the generic version of printing errors that behaves just like fprintf(stderr, msg) + exit(). --- src/filepath.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/filepath.c') diff --git a/src/filepath.c b/src/filepath.c index 6aca4a7..d0b68de 100644 --- a/src/filepath.c +++ b/src/filepath.c @@ -121,7 +121,7 @@ off_t fsize(const char *fn) { struct stat st; if (stat(fn, &st)) { if (errno != ENOENT) - diem("redo: failed to aquire stat() information about %s", fn); + fatal("redo: failed to aquire stat() information about %s", fn); return -1; } @@ -136,16 +136,16 @@ bool mkdirp(const char *dir) { if (stat(dir, &st)) { /* dir doesn't exist or stat failed */ if (errno != ENOENT) - diem("redo: failed to aquire stat() information about %s", dir); + fatal("redo: failed to aquire stat() information about %s", dir); if (mkdir(dir, 0755)) - diem("redo: failed to mkdir() '%s'", dir); + fatal("redo: failed to mkdir() '%s'", dir); return 1; } else { if (!S_ISDIR(st.st_mode)) { if (remove(dir)) - diem("redo: failed to remove %s", dir); + fatal("redo: failed to remove %s", dir); if (mkdir(dir, 0755)) - diem("redo: failed to mkdir() '%s'", dir); + fatal("redo: failed to mkdir() '%s'", dir); return 1; } return 0; -- cgit v1.2.3-70-g09d2