[LTP] [PATCH v2 1/1] ver_linux: Print filesystems
Petr Vorel
pvorel@suse.cz
Wed Oct 27 09:56:15 CEST 2021
both available and mounted.
check for options as aosp toybox does not support -h,
-T option requires IF_FEATURE_HUMAN_READABLE on busybox.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
changes v1->v2:
properly check options
ver_linux | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/ver_linux b/ver_linux
index 824c39510..82b7468a6 100755
--- a/ver_linux
+++ b/ver_linux
@@ -138,6 +138,21 @@ echo
echo 'cpuinfo:'
tst_cmd_run lscpu || cat /proc/cpuinfo
+echo
+echo 'available filesystems:'
+echo $(cut -f2 /proc/filesystems | sort -u)
+
+echo
+echo 'mounted filesystems (/proc/mounts):'
+cat /proc/mounts
+
+echo
+echo 'mounted filesystems (df):'
+df_opt=
+if ! (df -h 2>&1 | grep -i -q -e 'unknown option' -e 'invalid option'); then df_opt="$df_opt -h"; fi
+if ! (df -T 2>&1 | grep -i -q -e 'unknown option' -e 'invalid option'); then df_opt="$df_opt -T"; fi
+df $df_opt
+
echo
if is_enabled /sys/module/apparmor/parameters/enabled; then
echo 'AppArmor enabled'
--
2.33.1
More information about the ltp
mailing list