gen_init_cpio: remove leading `/' from file names
authorThomas Chou <thomas@wytron.com.tw>
Wed, 6 Oct 2010 07:13:53 +0000 (15:13 +0800)
committerMichal Marek <mmarek@suse.cz>
Thu, 2 Dec 2010 13:28:50 +0000 (14:28 +0100)
commit43f901fbc8ba94bfa8d58155ba9378d7a13af636
tree76e695aef20df9fbb6007c3f2467c6019fe8c428
parent01660dfc37933c92dbb7c5718aea61f88025d71f
gen_init_cpio: remove leading `/' from file names

When we extracted the generated cpio archive using "cpio -id" command,
it complained,

cpio: Removing leading `/' from member names
var/run
cpio: Removing leading `/' from member names
var/lib
cpio: Removing leading `/' from member names
var/lib/misc

It is worse with the latest "cpio" or "pax", which tries to overwrite
the host file system with the leading '/'.

So the leading '/' of file names should be removed. This is consistent
with the initramfs come with major distributions such as Fedora or
Debian, etc.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Mike Frysinger<vapier@gentoo.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
usr/gen_init_cpio.c