aboutsummaryrefslogtreecommitdiff
path: root/squashfs-tools/pseudo.c
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@squashfs.org.uk>2012-10-16 02:42:12 +0100
committerPhillip Lougher <phillip@squashfs.org.uk>2012-10-16 02:42:12 +0100
commit1198ac6d125fcedf6fcfc3997e3b29ea26a61c5d (patch)
treef25052ee63f5ce2b6eb88d98ee5ea72a11d2b38f /squashfs-tools/pseudo.c
parente86b8868e94d93bc3a28a7fcdb22540f0d554b75 (diff)
downloadsquashfs-tools-1198ac6d125fcedf6fcfc3997e3b29ea26a61c5d.tar.gz
pseudo: error messages should use ERROR()
and not be output on STDOUT using printf. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Diffstat (limited to 'squashfs-tools/pseudo.c')
-rw-r--r--squashfs-tools/pseudo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c
index 2ff596e..6e24204 100644
--- a/squashfs-tools/pseudo.c
+++ b/squashfs-tools/pseudo.c
@@ -255,20 +255,20 @@ int exec_file(char *command, struct pseudo_dev *dev)
sprintf(filename, "/tmp/squashfs_pseudo_%d_%d", pid, number ++);
pipefd[1] = open(filename, O_CREAT | O_TRUNC | O_RDWR, S_IRWXU);
if(pipefd[1] == -1) {
- printf("open failed\n");
+ ERROR("Executing dynamic pseudo file, open failed\n");
return -1;
}
#else
res = pipe(pipefd);
if(res == -1) {
- printf("pipe failed\n");
+ ERROR("Executing dynamic pseudo file, pipe failed\n");
return -1;
}
#endif
child = fork();
if(child == -1) {
- printf("fork failed\n");
+ ERROR("Executing dynamic pseudo file, fork failed\n");
goto failed;
}
@@ -276,11 +276,11 @@ int exec_file(char *command, struct pseudo_dev *dev)
close(STDOUT_FILENO);
res = dup(pipefd[1]);
if(res == -1) {
- printf("dup failed\n");
+ ERROR("Executing dynamic pseudo file, dup failed\n");
exit(EXIT_FAILURE);
}
execl("/bin/sh", "sh", "-c", command, (char *) NULL);
- printf("execl failed\n");
+ ERROR("Executing dynamic pseudo file, execl failed\n");
exit(EXIT_FAILURE);
}