FOREACH_DIRENT(entry, dir, return 0) {
_cleanup_fclose_ FILE *policy = NULL;
+ dirent_ensure_type(dir, entry);
if (!dirent_is_file(entry))
continue;
FOREACH_DIRENT(entry, dir, return 0) {
_cleanup_fclose_ FILE *policy = NULL;
+ dirent_ensure_type(dir, entry);
if (!dirent_is_file(entry))
continue;
struct dirent *de;
FOREACH_DIRENT_ALL(de, d, break) {
+ dirent_ensure_type(d, de);
if (!dirent_is_file(de))
continue;
FOREACH_DIRENT(de, d, return -errno) {
int k;
+ dirent_ensure_type(d, de);
if (!dirent_is_file(de))
continue;
_cleanup_free_ char *j = NULL, *osrelease = NULL, *cmdline = NULL;
_cleanup_close_ int fd = -1;
+ dirent_ensure_type(d, de);
if (!dirent_is_file(de))
continue;
if (hashmap_contains(ids, de->d_name))
continue;
+ dirent_ensure_type(d, de);
if (de->d_type == DT_LNK) {
/* We don't explicitly check for alias loops here. unit_ids_map_get() which
* limits the number of hops should be used to access the map. */