aboutsummaryrefslogtreecommitdiff
path: root/bin/gensquashfs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gensquashfs')
-rw-r--r--bin/gensquashfs/src/fstree_from_dir.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/gensquashfs/src/fstree_from_dir.c b/bin/gensquashfs/src/fstree_from_dir.c
index 85381f9..6200ea3 100644
--- a/bin/gensquashfs/src/fstree_from_dir.c
+++ b/bin/gensquashfs/src/fstree_from_dir.c
@@ -80,8 +80,10 @@ static int scan_dir(fstree_t *fs, tree_node_t *root, dir_iterator_t *dir,
int ret = dir->next(dir, &ent);
if (ret > 0)
break;
- if (ret < 0)
+ if (ret < 0) {
+ sqfs_perror("readdir", NULL, ret);
return -1;
+ }
if (should_skip(dir, ent, flags)) {
free(ent);
@@ -89,8 +91,10 @@ static int scan_dir(fstree_t *fs, tree_node_t *root, dir_iterator_t *dir,
}
if (S_ISLNK(ent->mode)) {
- if (dir->read_link(dir, &extra)) {
+ ret = dir->read_link(dir, &extra);
+ if (ret) {
free(ent);
+ sqfs_perror("readlink", ent->name, ret);
return -1;
}
}