aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/gen_init_cpio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
index 8365db6cfe06..7abc07f0fcd2 100644
--- a/usr/gen_init_cpio.c
+++ b/usr/gen_init_cpio.c
@@ -498,7 +498,9 @@ int main (int argc, char *argv[])
498 exit(1); 498 exit(1);
499 } 499 }
500 500
501 if (! (cpio_list = fopen(argv[1], "r"))) { 501 if (!strcmp(argv[1], "-"))
502 cpio_list = stdin;
503 else if (! (cpio_list = fopen(argv[1], "r"))) {
502 fprintf(stderr, "ERROR: unable to open '%s': %s\n\n", 504 fprintf(stderr, "ERROR: unable to open '%s': %s\n\n",
503 argv[1], strerror(errno)); 505 argv[1], strerror(errno));
504 usage(argv[0]); 506 usage(argv[0]);