common/log: move *_dump_log routines to common/log
authorCatherine Hoang <catherine.hoang@oracle.com>
Thu, 7 Oct 2021 00:26:40 +0000 (00:26 +0000)
committerEryu Guan <guaneryu@gmail.com>
Sun, 10 Oct 2021 14:44:23 +0000 (22:44 +0800)
Move _scratch_remount_dump_log and _test_remount_dump_log from
common/inject to common/log. These routines do not inject errors and
should be placed with other common log functions.

Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/inject
common/log

index b5334d4a9e7b26996b40efecbd0e509f5c277afe..6b590804d1ea15a5c2c4a7556f13965acfd2d35e 100644 (file)
@@ -111,29 +111,3 @@ _scratch_inject_error()
                _fail "Cannot inject error ${type} value ${value}."
        fi
 }
-
-# Unmount and remount the scratch device, dumping the log
-_scratch_remount_dump_log()
-{
-       local opts="$1"
-
-       if test -n "$opts"; then
-               opts="-o $opts"
-       fi
-       _scratch_unmount
-       _scratch_dump_log
-       _scratch_mount "$opts"
-}
-
-# Unmount and remount the test device, dumping the log
-_test_remount_dump_log()
-{
-       local opts="$1"
-
-       if test -n "$opts"; then
-               opts="-o $opts"
-       fi
-       _test_unmount
-       _test_dump_log
-       _test_mount "$opts"
-}
index c7921f5020b2f8c35e6f25f18abdd72d4739f2eb..0a9aaa7fdaeb4a14edefbd131bc0fbb254f169dc 100644 (file)
@@ -608,5 +608,31 @@ _get_log_configs()
     esac
 }
 
+# Unmount and remount the scratch device, dumping the log
+_scratch_remount_dump_log()
+{
+       local opts="$1"
+
+       if test -n "$opts"; then
+               opts="-o $opts"
+       fi
+       _scratch_unmount
+       _scratch_dump_log
+       _scratch_mount "$opts"
+}
+
+# Unmount and remount the test device, dumping the log
+_test_remount_dump_log()
+{
+       local opts="$1"
+
+       if test -n "$opts"; then
+               opts="-o $opts"
+       fi
+       _test_unmount
+       _test_dump_log
+       _test_mount "$opts"
+}
+
 # make sure this script returns success
 /bin/true