diff options
author | Phillip Lougher <phillip@squashfs.org.uk> | 2012-10-16 02:42:12 +0100 |
---|---|---|
committer | Phillip Lougher <phillip@squashfs.org.uk> | 2012-10-16 02:42:12 +0100 |
commit | 1198ac6d125fcedf6fcfc3997e3b29ea26a61c5d (patch) | |
tree | f25052ee63f5ce2b6eb88d98ee5ea72a11d2b38f /squashfs-tools/pseudo.c | |
parent | e86b8868e94d93bc3a28a7fcdb22540f0d554b75 (diff) | |
download | squashfs-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.c | 10 |
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); } |