[Toybox] [PATCH] cpio: fixes for Android kernel build.
Rob Landley
rob at landley.net
Wed Aug 19 17:16:15 PDT 2020
On 8/19/20 6:05 PM, enh wrote:
> Where's this bug? It's not in the vanilla linux as of yesterday?
>
> https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline/kernel/gen_kheaders.sh#71
Sigh. WHY is that not in scripts? Ok.
Does the attached patch look like the start of a good fix? It lets you add ~ to
the start of optstr to give every -x option the parsing behavior of "tar xvjf".
(Which I _think_ is the unix v6 semantics from 1975, which cpio seems to retain
for some reason.)
That means "cpio -pd out" should work and "cpio out -pd" should provide an error
message.
$ ./cpio -pd out
cpio: chdir 'out': No such file or directory
^C
$ ./cpio out -pd
cpio: Missing argument to -p (see "cpio --help")
Which looks like there's a seperate bug that the receive side ends and the send
side doesn't immediately notice, but presumably it would if we fed it some data
so it unblocked...
$ echo xiphoid | ./cpio -pd out
cpio: chdir 'out': No such file or directory
Yeah, that exits. Close enough, I'm probably ok with that behavior.
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legendaryblackbeast.patch
Type: text/x-patch
Size: 2172 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200819/d2dc409c/attachment-0003.bin>
More information about the Toybox
mailing list