X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=usr%2Fgen_init_cpio.c;h=7abc07f0fcd2603606321dc7e3131453cf313da2;hb=b975dee3811ae0c58bd0e19cbd041cac8dd37ec5;hp=8365db6cfe06449246ef5156a4a886d7e14fbdbc;hpb=60f29b1e1600d89aee5e529acb4b276a6650cb8b;p=linux-2.6 diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c index 8365db6cfe..7abc07f0fc 100644 --- a/usr/gen_init_cpio.c +++ b/usr/gen_init_cpio.c @@ -498,7 +498,9 @@ int main (int argc, char *argv[]) exit(1); } - if (! (cpio_list = fopen(argv[1], "r"))) { + if (!strcmp(argv[1], "-")) + cpio_list = stdin; + else if (! (cpio_list = fopen(argv[1], "r"))) { fprintf(stderr, "ERROR: unable to open '%s': %s\n\n", argv[1], strerror(errno)); usage(argv[0]);