]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
dm_subsystem: ignore dmsetup output if exit code is not zero
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 17 Apr 2012 16:50:53 +0000 (16:50 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 17 Apr 2012 16:50:53 +0000 (16:50 +0000)
svn-id: @12552

functions

index d79bb4a192d32bb0985c1e7aee5bfa8fd9df46a4..3211afeaa53f50c8a0611b83df0af67e2a81cca6 100644 (file)
--- a/functions
+++ b/functions
@@ -159,7 +159,7 @@ dm_name() {
 dm_subsystem() {
        local node="$1" out
        out=$(dmsetup info -c --noheadings -o subsystem $node)
-       if [ -n "$out" ]; then
+       if [ $? -eq 0 -a -n "$out" ]; then
                echo "$out"
                return
        fi
This page took 0.38448 seconds and 4 git commands to generate.