From e7ecb1f92ae618a56ee8eabb6cbf98365de3695a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 2 Jul 2023 19:50:05 +0200 Subject: Move sqfs_dir_entry_t code from libio into libsquashfs Signed-off-by: David Oberhollenzer --- bin/gensquashfs/src/fstree_from_file.c | 2 +- bin/tar2sqfs/src/process_tarball.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/gensquashfs/src/fstree_from_file.c b/bin/gensquashfs/src/fstree_from_file.c index 16fa516..2d7a62d 100644 --- a/bin/gensquashfs/src/fstree_from_file.c +++ b/bin/gensquashfs/src/fstree_from_file.c @@ -112,7 +112,7 @@ static const struct callback_t { } file_list_hooks[] = { { "dir", S_IFDIR, 0, false, true, add_generic }, { "slink", S_IFLNK, 0, true, false, add_generic }, - { "link", S_IFLNK, DIR_ENTRY_FLAG_HARD_LINK, true, false, add_generic }, + { "link", S_IFLNK, SQFS_DIR_ENTRY_FLAG_HARD_LINK, true, false, add_generic }, { "nod", 0, 0, true, false, add_device }, { "pipe", S_IFIFO, 0, false, false, add_generic }, { "sock", S_IFSOCK, 0, false, false, add_generic }, diff --git a/bin/tar2sqfs/src/process_tarball.c b/bin/tar2sqfs/src/process_tarball.c index ecb9095..331936d 100644 --- a/bin/tar2sqfs/src/process_tarball.c +++ b/bin/tar2sqfs/src/process_tarball.c @@ -101,7 +101,7 @@ static int create_node_and_repack_data(sqfs_writer_t *sqfs, dir_iterator_t *it, goto fail_errno; if (!cfg.quiet) { - if (ent->flags & DIR_ENTRY_FLAG_HARD_LINK) { + if (ent->flags & SQFS_DIR_ENTRY_FLAG_HARD_LINK) { printf("Hard link %s -> %s\n", ent->name, link); } else { printf("Packing %s\n", ent->name); @@ -130,7 +130,7 @@ fail_errno: static int set_root_attribs(sqfs_writer_t *sqfs, dir_iterator_t *it, const sqfs_dir_entry_t *ent) { - if ((ent->flags & DIR_ENTRY_FLAG_HARD_LINK) || !S_ISDIR(ent->mode)) { + if ((ent->flags & SQFS_DIR_ENTRY_FLAG_HARD_LINK) || !S_ISDIR(ent->mode)) { fprintf(stderr, "'%s' is not a directory!\n", ent->name); return -1; } @@ -204,7 +204,7 @@ int process_tarball(dir_iterator_t *it, sqfs_writer_t *sqfs) } if (link != NULL && - ((ent->flags & DIR_ENTRY_FLAG_HARD_LINK) || + ((ent->flags & SQFS_DIR_ENTRY_FLAG_HARD_LINK) || !no_symlink_retarget)) { if (canonicalize_name(link) == 0 && !strncmp(link, root_becomes, rootlen) && -- cgit v1.2.3