]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: simplify flags for recurse_dir()
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Nov 2022 10:37:42 +0000 (11:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 9 Nov 2022 10:44:17 +0000 (11:44 +0100)
We are not interested in the struct dirent data, hence there's no point
in passing RECURSE_DIR_ENSURE_TYPE. Let's drop it, and thus avoid some
extrac work on file systems where readdir() does not report .d_type.

Also drop RECURSE_DIR_SAME_MOUNT, because DDIs after all may contain
multiple partitions, and we mount them all together. The --list command
really should report the full set of files in an image.

src/dissect/dissect.c

index 7e70ecf7a8a0f225fcbc0fec2c4099106400d8c2..dafd474a3004c5efb2bd73671d8b1d74f204e85b 100644 (file)
@@ -896,7 +896,7 @@ static int action_list_or_copy(DissectedImage *m, LoopDevice *d) {
                 if (dfd < 0)
                         return log_error_errno(errno, "Failed to open mount directory: %m");
 
-                r = recurse_dir(dfd, NULL, 0, UINT_MAX, RECURSE_DIR_SORT|RECURSE_DIR_ENSURE_TYPE|RECURSE_DIR_SAME_MOUNT, list_print_item, NULL);
+                r = recurse_dir(dfd, NULL, 0, UINT_MAX, RECURSE_DIR_SORT, list_print_item, NULL);
                 if (r < 0)
                         return log_error_errno(r, "Failed to list image: %m");
         }