From: Michael Orlitzky Date: Mon, 26 Feb 2018 18:13:56 +0000 (-0500) Subject: libadacl: improve safe_open() error message when given bad args. X-Git-Tag: v0.1.0~9 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f785b1da4fcfab5410a7aebacf6d6327176d58fa;p=apply-default-acl.git libadacl: improve safe_open() error message when given bad args. --- diff --git a/src/libadacl.c b/src/libadacl.c index 69f2073..1fb54a8 100644 --- a/src/libadacl.c +++ b/src/libadacl.c @@ -102,7 +102,8 @@ int safe_open_ex(int at_fd, char* pathname, int flags) { */ int safe_open(const char* pathname, int flags) { if (pathname == NULL || strlen(pathname) == 0 || pathname[0] == '\0') { - /* error? */ + errno = EINVAL; + perror("safe_open (args)"); return OPEN_ERROR; }