diff options
Diffstat (limited to 'unpack')
-rw-r--r-- | unpack/describe.c | 3 | ||||
-rw-r--r-- | unpack/list_files.c | 7 | ||||
-rw-r--r-- | unpack/restore_fstree.c | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/unpack/describe.c b/unpack/describe.c index 4c35070..d30f844 100644 --- a/unpack/describe.c +++ b/unpack/describe.c @@ -74,7 +74,8 @@ int describe_tree(const sqfs_tree_node_t *root, const char *unpack_root) case S_IFSOCK: return print_simple("sock", root, NULL); case S_IFLNK: - return print_simple("slink", root, root->inode->slink_target); + return print_simple("slink", root, + (const char *)root->inode->extra); case S_IFIFO: return print_simple("pipe", root, NULL); case S_IFREG: diff --git a/unpack/list_files.c b/unpack/list_files.c index 0d64010..c08c2dd 100644 --- a/unpack/list_files.c +++ b/unpack/list_files.c @@ -85,7 +85,7 @@ static void print_node_size(const sqfs_tree_node_t *n, char *buffer) { switch (n->inode->base.mode & S_IFMT) { case S_IFLNK: - print_size(strlen(n->inode->slink_target), buffer); + print_size(strlen((const char *)n->inode->extra), buffer); break; case S_IFREG: { sqfs_u64 size; @@ -151,7 +151,8 @@ void list_files(const sqfs_tree_node_t *node) n->name); if (S_ISLNK(n->inode->base.mode)) { - printf(" -> %s\n", n->inode->slink_target); + printf(" -> %s\n", + (const char *)n->inode->extra); } else { fputc('\n', stdout); } @@ -164,7 +165,7 @@ void list_files(const sqfs_tree_node_t *node) node->uid, node->gid, sizestr, node->name); if (S_ISLNK(node->inode->base.mode)) { - printf(" -> %s\n", node->inode->slink_target); + printf(" -> %s\n", (const char *)node->inode->extra); } else { fputc('\n', stdout); } diff --git a/unpack/restore_fstree.c b/unpack/restore_fstree.c index 00d75ef..8f99439 100644 --- a/unpack/restore_fstree.c +++ b/unpack/restore_fstree.c @@ -57,9 +57,9 @@ static int create_node(const sqfs_tree_node_t *n, const char *name) } break; case S_IFLNK: - if (symlink(n->inode->slink_target, name)) { + if (symlink((const char *)n->inode->extra, name)) { fprintf(stderr, "ln -s %s %s: %s\n", - n->inode->slink_target, name, + (const char *)n->inode->extra, name, strerror(errno)); return -1; } |