AW: Issue with tar (Busybox 1.20.2): unknown file type

dietmar.schindler at manroland-web.com dietmar.schindler at manroland-web.com
Thu Jun 13 06:20:34 UTC 2013


> piquemal michel
> Gesendet: Dienstag, 11. Juni 2013 22:46
>
> ...
>
> I decided to do tar applet, with all its options.
>
> It compiles, and work on my aboriginal system image, but fails on target with message
> "unknown file type".
> I tried with tar options off: same issue.
>
>
> I tried same config but static build: it works!
> However I find the error message strange would my target really miss a library...
> How to find which eventual one?
> ...
> lstat("toto", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> ...
> write(2, "tar: toto: unknown file type\n", 29tar: toto: unknown file type
> ) = 29

It looks like an incompatibility of lstat() (which presumably lies in your libc.so) with the busybox binary: According to strace, the lstat system call returns st_mode=S_IFDIR, i. e. a directory; yet a directory is a file type known to tar, checked by the line

        } else if (S_ISDIR(statbuf->st_mode)) {

in tar.c:writeTarHeader(), so tar can't normally enter the else-block with the error message you see. Therefore, I think that the information from the lstat syscall is not correctly returned via the library function to the tar code. I'd try to rebuild the libc.so - with identical compiler settings to the ones used when compiling the busybox applet.
--
Regards,
Dietmar Schindler
________________________________________
manroland web systems GmbH -- Managing Director: Eckhard Hoerner-Marass
Registered Office: Augsburg -- Trade Register: AG Augsburg -- HRB-No. 26816 -- VAT: DE281389840

Confidentiality note:
This eMail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this eMail in error, then please delete this eMail.

! Please consider your environmental responsibility before printing this eMail
________________________________________


More information about the busybox mailing list