diff options
Diffstat (limited to 'utils/ipu3/ipu3-unpack.c')
-rw-r--r-- | utils/ipu3/ipu3-unpack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/ipu3/ipu3-unpack.c b/utils/ipu3/ipu3-unpack.c index 2dce1038..6ee8c45a 100644 --- a/utils/ipu3/ipu3-unpack.c +++ b/utils/ipu3/ipu3-unpack.c @@ -8,6 +8,7 @@ #include <errno.h> #include <fcntl.h> +#include <libgen.h> #include <stdint.h> #include <stdio.h> #include <string.h> @@ -15,7 +16,7 @@ #include <sys/types.h> #include <unistd.h> -static void usage(const char *argv0) +static void usage(char *argv0) { printf("Usage: %s input-file output-file\n", basename(argv0)); printf("Unpack the IPU3 raw Bayer format to 16-bit Bayer\n"); @@ -78,8 +79,8 @@ int main(int argc, char *argv[]) } ret = write(out_fd, out_data, 50); - if (ret < -1) { - fprintf(stderr, "Failed to read input data: %s\n", + if (ret == -1) { + fprintf(stderr, "Failed to write output data: %s\n", strerror(errno)); goto done; } |