Bug 12976 - cpio doesn't list all hardlinks in an archive
Summary: cpio doesn't list all hardlinks in an archive
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.33.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-02 11:15 UTC by Vincent Breiner
Modified: 2020-06-02 11:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Breiner 2020-06-02 11:15:51 UTC
Busybox's cpio doesn't list all hardlinks (if there's more than 1) in the archive.

Example:
###########################
echo "ZZZZZ" > a
ln a b # b is a hardlink to a
ls | cpio -ov -H newc > /tmp/new.cpio # Creates a new archive with a and b

# Debian's cpio, lists both a and b
cpio -t < /tmp/new.cpio

# Busybox's cpio, lists only a
./busybox cpio -t < /tmp/new.cpio
###########################


I've compiled busybox with the default config.