author: Mike Frysinger <vapier@gentoo.org> 2007-05-10 22:44:28 -0700
committer: Sam Ravnborg <sam@ravnborg.org> 2007-07-16 21:15:52 +0200
commit: f2434ec1e08e44c2568b29c2879b3346aa29dbd2
parent: e99c343f169cdcb43f1508873a3c9e19ffe4c64a
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 1 deletion
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[])
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]);