diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-03-10 04:11:14 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-03-10 04:11:14 -0400 |
commit | bc7d4c9bf7245e9a97f504fd229f2b850358749b (patch) | |
tree | 510f81fb6c35204a41d7638afbadf23be22c2369 /qcheck.c | |
parent | eat_file: convert API to work on dynamic buffers (diff) | |
download | portage-utils-bc7d4c9bf7245e9a97f504fd229f2b850358749b.tar.gz portage-utils-bc7d4c9bf7245e9a97f504fd229f2b850358749b.tar.bz2 portage-utils-bc7d4c9bf7245e9a97f504fd229f2b850358749b.zip |
vdb: add a q_vdb_pkg_eat helper to unify various call styles
Now that the core eat func is based on dynamic bufs, it's a lot easier
to create a core vdb helper for eating pkg files.
This has the added advantage of making the pkg dir open a delayed call.
We only opendir when we actually want to read files out of it. For many
funcs which don't do that, it saves a lot of syscall overhead.
Diffstat (limited to 'qcheck.c')
-rw-r--r-- | qcheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -69,7 +69,7 @@ static int qcheck_process_contents(q_vdb_pkg_ctx *pkg_ctx, struct qcheck_opt_sta fpx = NULL; - fd = q_vdb_pkg_openat(pkg_ctx, "CONTENTS", O_RDONLY|O_CLOEXEC); + fd = q_vdb_pkg_openat(pkg_ctx, "CONTENTS", O_RDONLY|O_CLOEXEC, 0); if (fd == -1) return EXIT_SUCCESS; if (fstat(fd, &cst)) { |