[kexec-tools/f20] mkdumprd: reorganize the code to make flow of script clear

WANG Chao wangchao at fedoraproject.org
Mon Mar 10 05:54:27 UTC 2014


commit 09e2404304d2fb9e70357e54e25d3e80a77d7d11
Author: Baoquan He <bhe at redhat.com>
Date:   Mon Mar 3 18:37:15 2014 +0800

    mkdumprd: reorganize the code to make flow of script clear
    
    Move the invocation of check_resettable() to be together with all
    other invocation of functions. This can make the flow of script
    clearer and more readable.
    
    Signed-off-by: Baoquan He <bhe at redhat.com>
    Acked-by: Vivek Goyal <vgoyal at redhat.com>

 mkdumprd |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/mkdumprd b/mkdumprd
index 0b71391..f7d2f4d 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -450,10 +450,6 @@ check_resettable()
     return 1
 }
 
-if ! check_resettable; then
-    exit 1
-fi
-
 # $1: maj:min
 is_crypt()
 {
@@ -482,6 +478,10 @@ check_crypt()
     return 1
 }
 
+if ! check_resettable; then
+    exit 1
+fi
+
 if ! check_crypt; then
     echo "Warning: Encrypted device is in dump path. User will prompted for password during second kernel boot." 
 fi


More information about the scm-commits mailing list