if (dir < 0)
return dir;
+ DBG(CXT, ul_debugobj(pc, "access: '%s'", path));
rc = faccessat(dir, path, mode, 0);
if (rc && errno == ENOENT
if (!pc) {
fd = open(path, flags);
- DBG(CXT, ul_debug("opening '%s'", path));
+ DBG(CXT, ul_debug("opening [%d] '%s'", flags, path));
} else {
int dir = ul_path_get_dirfd(pc);
if (dir < 0)
&& pc->redirect_on_enoent(pc, path, &dir) == 0)
fd = openat(dir, path, flags);
- DBG(CXT, ul_debugobj(pc, "opening '%s'", path));
+ DBG(CXT, ul_debugobj(pc, "opening [%d] '%s'", flags, path));
}
return fd;
}
if (fd < 0)
return -errno;
+ DBG(CXT, ul_debug(" reading '%s'", path));
rc = read_all(fd, buf, len);
errsv = errno;
if (!f)
return -EINVAL;
+ DBG(CXT, ul_debug(" fscanf [%s] '%s'", fmt, path));
+
va_start(fmt_ap, fmt);
rc = vfscanf(f, fmt, fmt_ap);
va_end(fmt_ap);