Patchwork [04/20] udev-cache: Don't ignore errors from cache extract

login
register
mail settings
Submitter Ben Shelton
Date Aug. 4, 2014, 6:40 p.m.
Message ID <70af713a0ac99c9e5fa6a1e01cf2e1cd54e5a14e.1407177403.git.ben.shelton@ni.com>
Download mbox | patch
Permalink /patch/77225/
State New
Headers show

Comments

Ben Shelton - Aug. 4, 2014, 6:40 p.m.
From: Richard Tollerton <rich.tollerton@ni.com>

Currently, error messages generated during tarball extract are
suppressed. This seems ham-handed, particularly since under normal
operation, the only expected error ought to be the attempted extraction
of pipes, which typically only means /dev/log.

So stop the redirections and add an --exclude=log to suppress the error
message when attempting to extract /dev/log.

This requires CONFIG_FEATURE_TAR_LONG_OPTIONS if using busybox tar.

Natinst-Rally-ID: TA44427
Acked-by: Gratian Crisan <gratian.crisan@ni.com>
Natinst-ReviewBoard-ID: 58620
Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
---
 meta/recipes-core/udev/udev/init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Otavio Salvador - Aug. 4, 2014, 7:32 p.m.
On Mon, Aug 4, 2014 at 3:40 PM, Ben Shelton <ben.shelton@ni.com> wrote:
> From: Richard Tollerton <rich.tollerton@ni.com>
>
> Currently, error messages generated during tarball extract are
> suppressed. This seems ham-handed, particularly since under normal
> operation, the only expected error ought to be the attempted extraction
> of pipes, which typically only means /dev/log.
>
> So stop the redirections and add an --exclude=log to suppress the error
> message when attempting to extract /dev/log.
>
> This requires CONFIG_FEATURE_TAR_LONG_OPTIONS if using busybox tar.
>
> Natinst-Rally-ID: TA44427
> Acked-by: Gratian Crisan <gratian.crisan@ni.com>
> Natinst-ReviewBoard-ID: 58620
> Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
> ---


Acked-by: Otavio Salvador <otavio@ossystems.com.br>

I didn't test this at runtime so my only question is did you check if
we provide this option by default in busybox?

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 1e69861..a96309d 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -69,7 +69,7 @@  case "$1" in
 		    readfiles /etc/udev/cache.data
 		    OLDDATA="$READDATA"
 		    if [ "$OLDDATA" = "$NEWDATA" ]; then
-                            (cd /; tar xzf $DEVCACHE > /dev/null 2>&1)
+                            (cd /; tar xzf $DEVCACHE --exclude=log)
                             not_first_boot=1
                             [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
                             [ -e /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache