]> git.wh0rd.org - patches.git/blame_incremental - linux-gen-init-cpio-stdin.patch
initial import
[patches.git] / linux-gen-init-cpio-stdin.patch
... / ...
CommitLineData
1diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
2index 8365db6..7abc07f 100644
3--- a/usr/gen_init_cpio.c
4+++ b/usr/gen_init_cpio.c
5@@ -498,7 +498,9 @@ int main (int argc, char *argv[])
6 exit(1);
7 }
8
9- if (! (cpio_list = fopen(argv[1], "r"))) {
10+ if (!strcmp(argv[1], "-"))
11+ cpio_list = stdin;
12+ else if (! (cpio_list = fopen(argv[1], "r"))) {
13 fprintf(stderr, "ERROR: unable to open '%s': %s\n\n",
14 argv[1], strerror(errno));
15 usage(argv[0]);