cpio: fix -o-less cpio -F FILE
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 9 Jan 2010 19:25:42 +0000 (20:25 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 9 Jan 2010 19:25:42 +0000 (20:25 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/cpio.c

index 5eb393d..858e59b 100644 (file)
@@ -312,7 +312,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
        opt_complementary = "=0";
        opt = getopt32(argv, OPTION_STR, &cpio_filename);
        if (opt & CPIO_OPT_FILE) { /* -F */
-               archive_handle->src_fd = xopen(cpio_filename, O_RDONLY);
+               xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO);
        }
 #else
        /* _exactly_ one parameter for -p, thus <= 1 param if -p is allowed */