+ /* Set up the output file */
+ if (argc >= 3) {
+ if (strncmp(argv[2], "-", 1) == 0) {
+ output_fd = STDOUT_FILENO;
+ } else {
+ output_fd = open(argv[2], O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
+ if (output_fd < 0) {
+ perror("open");
+ ret = output_fd;
+ goto out;
+ }
+ }
+ }
+