commit 4b86923358c0 (Fixes for tiny-cloud Wrapper) changed API so all
init functions had an init__ prefix and the SKIP_INIT_ACTION was moved
to tiny-cloud.
Adjust the tests for this.
yash[1] and zsh does not handle 8-bit bytes in strings good. Work around it
by using printf ... | cmp ... to compare the header. This should be 100%
posix compatible.
Also fix some of the compression header magic bytes:
- unxz: Use octal aas the string '\3757zXZ\000' was misinterpreted by some
shells.
- lzma: the third byte represents compression mode[2], and we want
support all compression modes not only '8', so we only check the first
three bytes instead of 4.
[1]: Upstream report: https://osdn.net/projects/yash/ticket/47772
[2]: https://github.com/frizb/FirmwareReverseEngineering/blob/master/IdentifyingCompressionAlgorithms.md#lzma
Simplify it a bit.
- use awk /proc/mounts instead of busybox mountpoint
- use sysfs to find partition and volume. This is more robust
- add tests for it