|
From: | Tim Kientzle |
Subject: | Re: [Bug-cpio] Re: Bug#565474: cpio makes device nodes into hard links when copying out of a cramfs image |
Date: | Sun, 17 Jan 2010 16:47:12 -0800 |
User-agent: | Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 |
On Fri, Jan 15, 2010 at 08:06:54PM -0800, Carl Miller wrote:
cramfs takes a shortcut with device nodes, and assigns them all inode 1.
I presume it also assigns nlinks == 1?
When using cpio to copy files out of a cramfs image, cpio turns the second and all subsequent copied device nodes into hard links to the first copied out device node, based on them all having the same st_dev and st_ino.
Another possible solution: When checking for hard links during copy-out, do not generate hardlink entries if nlinks < 2. Tim
[Prev in Thread] | Current Thread | [Next in Thread] |