Bug 12976

Summary: cpio doesn't list all hardlinks in an archive
Product: Busybox Reporter: Vincent Breiner <vbreiner851>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.33.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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.