Extract opendirat() helper function into libotutil

We were duplicating the code to do an opendirat() in a few places.
This commit is contained in:
Colin Walters committed 2014-09-16 11:34:39 -04:00
1 parent dfeb27eca5
commit b756a13a65
6 files changed
+94 -14

No files matched your search

+1 -1
View File
@@ -1100,7 +1100,7 @@ list_loose_objects (OstreeRepo *self,
buf[0] = hexchars[c >> 4];
buf[1] = hexchars[c & 0xF];
buf[2] = '\0';
dfd = openat (self->objects_dir_fd, buf, O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC);
dfd = ot_opendirat (self->objects_dir_fd, buf, FALSE);
if (dfd == -1)
{
if (errno == ENOENT)