udev-cache: take a read-only rootfs into consideration
authorChen Qi <Qi.Chen@windriver.com>
Fri, 28 Jun 2013 07:48:22 +0000 (15:48 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Jul 2013 21:23:47 +0000 (22:23 +0100)
commitf6c4dc738c68b1f281d9cf12d749368ae5ab5cb5
tree6291be437ac8b8e6adce1d9c2ae8d6954687a0a3
parentd8862f5cd2f3881445c3eb4bd5e23ea9f61ef4a7
udev-cache: take a read-only rootfs into consideration

In case of a read-only rootfs, we skip the process of generating
udev cache, as the data cannot be persisted between reboots.

However, it's possbile that the $DEVCACHE (default to /etc/dev.tar)
exists in a read-only rootfs, no matter how it's generated or installed.
In such situation, we try to use $DEVCACHE if possible.

Besides the basic changes in the logic of udev cache handling,
this patch also adds code to output more information if the udev
cache is not used and VERBOSE enabled.

This patch also changes the readfile function to readfiles function
so that it could handle more than one file at once.

(From OE-Core rev: 4ec1266e7e1aacdb9d3d0fc5cd6307b60df1731e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/udev/init
meta/recipes-core/udev/udev/udev-cache