aboutsummaryrefslogtreecommitdiff
path: root/bin/gensquashfs/src/glob.c
AgeCommit message (Collapse)Author
2023-10-24Cleanup: gensquashfs: merge glob scan_directory & fstree_from_dirDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-09-08genquashfs: detect/filter hardlinks when scanning a directoryDavid Oberhollenzer
The new behavior is enabled by default (except on Windows) and needs to be turned off explicitly. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-09-03coverity: fix: use-after-free in error pathDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-09-03gensquashfs: fix file path for glob directory scanningDavid Oberhollenzer
If we glob a directory, the generated entries can be added to a virtual sub directory, that does not corespond to the original layout. If we try to use those virtual paths for packing files, it will fail, so we need to remove that prefix to reconstruct the original path. Second, the glob operation allows us to select a sub-directory of the pack-dir. This prefix-path is stripped away when scanning the entries. We need to add it back to get the original, pack-dir relative file paths. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-08-10Refactor: rename dir_iterator_t to sqfs_dir_iterator_tDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-07-03Refactor: rename dir_entry_t to sqfs_dir_entry_tDavid Oberhollenzer
Exact operation performed: git ls-files -z | \ xargs -0 sed -i -e 's/dir_entry_t/sqfs_dir_entry_t/g Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-23gensquashfs: general cleanup after restructuring the parsing codeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-23gensquashfs: pull usage of line splitting up into fstree_from_fileDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-23gensquashfs: use line split helper in parsing glob argumentsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-23gensquashfs: split glob filter flags into separate tableDavid Oberhollenzer
Allow spaces between `-type` and the character, look it up from a table instead of having `-type <char>` pairs in the main table. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-05-30libfstree: accept dir_entry_t instead of path and struct statDavid Oberhollenzer
Because the dir_entry_t also has a flag for had links, the regular node and hard-link node interface can be unified. This simplifies the users of libfstree (gensquashfs, tar2sqfs) since we can simply hose the entries from an iterator directly into the tree. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-05-30gensquashfs: simplify parsing of glob flagsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-05-30gensquashfs: Cleanup glob error handlingDavid Oberhollenzer
Move the error handling to the end of the function, make sure we properly handle all allocation failures. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-05-30gensquashfs: split glob related code from fstree_from_file.cDavid Oberhollenzer
The glob function and everything associated is moved to a separate file, the entry point exposed any the special case handling is removed from the other callbacks in fstree_from_file.c Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>