Subject: [PATCH 10/19] kbuild: add support for reading stdin with gen_init_cpio
From: Mike Frysinger <[EMAIL PROTECTED]>
Date: Thu, 10 May 2007 22:44:28 -0700
Treat an argument of "-" as meaning "read stdin for cpio files" so
gen_init_cpio can be piped into.
Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
usr/gen_init_cpio.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
index 8365db6..7abc07f 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]);
--
1.5.1.rc3.1544.g8a923
----- End forwarded message -----
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kbuild-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel