Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f2434ec1e08e44c2568b29c2879b3346aa29dbd2
Commit:     f2434ec1e08e44c2568b29c2879b3346aa29dbd2
Parent:     e99c343f169cdcb43f1508873a3c9e19ffe4c64a
Author:     Mike Frysinger <[EMAIL PROTECTED]>
AuthorDate: Thu May 10 22:44:28 2007 -0700
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 21:15:52 2007 +0200

    kbuild: add support for reading stdin with gen_init_cpio
    
    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]);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to