ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 1/1] ver_linux: Print filesystems
@ 2021-10-27  7:56 Petr Vorel
  2021-11-03 14:36 ` Cyril Hrubis
  0 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2021-10-27  7:56 UTC (permalink / raw)
  To: ltp

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-03 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27  7:56 [LTP] [PATCH v2 1/1] ver_linux: Print filesystems Petr Vorel
2021-11-03 14:36 ` Cyril Hrubis
2021-11-03 14:48   ` Petr Vorel
2021-11-03 15:03     ` Cyril Hrubis
2021-11-03 15:17       ` Petr Vorel
2021-11-03 15:38         ` Cyril Hrubis
2021-11-03 16:10           ` Petr Vorel
2021-11-03 16:20           ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).