aboutsummaryrefslogtreecommitdiff
path: root/lib/functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/functions.c')
-rw-r--r--lib/functions.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/functions.c b/lib/functions.c
index e37887ed..e476557c 100644
--- a/lib/functions.c
+++ b/lib/functions.c
@@ -140,6 +140,11 @@ void xexec(char **argv)
error_exit("No %s", argv[0]);
}
+void xaccess(char *path, int flags)
+{
+ if (access(path, flags)) error_exit("Can't access '%s'\n", path);
+}
+
// Die unless we can open/create a file, returning file descriptor.
int xcreate(char *path, int flags, int mode)
{