aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/gensquashfs/src/mkfs.c6
-rw-r--r--bin/rdsquashfs/src/rdsquashfs.c6
-rw-r--r--bin/sqfs2tar/src/sqfs2tar.c6
-rw-r--r--bin/sqfsdiff/src/sqfsdiff.c4
4 files changed, 11 insertions, 11 deletions
diff --git a/bin/gensquashfs/src/mkfs.c b/bin/gensquashfs/src/mkfs.c
index a178066..6d04040 100644
--- a/bin/gensquashfs/src/mkfs.c
+++ b/bin/gensquashfs/src/mkfs.c
@@ -40,9 +40,9 @@ static int pack_files(sqfs_block_processor_t *data, fstree_t *fs,
if (!opt->cfg.quiet)
printf("packing %s\n", path);
- file = sqfs_open_file(path, SQFS_FILE_OPEN_READ_ONLY);
- if (file == NULL) {
- perror(path);
+ ret = sqfs_file_open(&file, path, SQFS_FILE_OPEN_READ_ONLY);
+ if (ret) {
+ sqfs_perror(path, "open", ret);
free(node_path);
return -1;
}
diff --git a/bin/rdsquashfs/src/rdsquashfs.c b/bin/rdsquashfs/src/rdsquashfs.c
index 9d8f3ba..2f5c50d 100644
--- a/bin/rdsquashfs/src/rdsquashfs.c
+++ b/bin/rdsquashfs/src/rdsquashfs.c
@@ -114,9 +114,9 @@ int main(int argc, char **argv)
process_command_line(&opt, argc, argv);
- file = sqfs_open_file(opt.image_name, SQFS_FILE_OPEN_READ_ONLY);
- if (file == NULL) {
- perror(opt.image_name);
+ ret = sqfs_file_open(&file, opt.image_name, SQFS_FILE_OPEN_READ_ONLY);
+ if (ret) {
+ sqfs_perror(opt.image_name, "open", ret);
goto out;
}
diff --git a/bin/sqfs2tar/src/sqfs2tar.c b/bin/sqfs2tar/src/sqfs2tar.c
index 714f6db..e21cd7a 100644
--- a/bin/sqfs2tar/src/sqfs2tar.c
+++ b/bin/sqfs2tar/src/sqfs2tar.c
@@ -139,9 +139,9 @@ int main(int argc, char **argv)
goto out;
}
- file = sqfs_open_file(filename, SQFS_FILE_OPEN_READ_ONLY);
- if (file == NULL) {
- perror(filename);
+ ret = sqfs_file_open(&file, filename, SQFS_FILE_OPEN_READ_ONLY);
+ if (ret) {
+ sqfs_perror(filename, "open", ret);
goto out;
}
diff --git a/bin/sqfsdiff/src/sqfsdiff.c b/bin/sqfsdiff/src/sqfsdiff.c
index d789fe1..1bbf62c 100644
--- a/bin/sqfsdiff/src/sqfsdiff.c
+++ b/bin/sqfsdiff/src/sqfsdiff.c
@@ -22,9 +22,9 @@ static int open_sfqs(sqfs_state_t *state, const char *path)
memset(state, 0, sizeof(*state));
- state->file = sqfs_open_file(path, SQFS_FILE_OPEN_READ_ONLY);
+ ret = sqfs_file_open(&state->file, path, SQFS_FILE_OPEN_READ_ONLY);
if (state->file == NULL) {
- perror(path);
+ sqfs_perror(path, "open", ret);
return -1;
}