- While scanning for a filesystem on a disk, the klibc utility can
return a null string if it not finds a filesystem (e.g. on a container
partition), and grepping for a null string either reports true if
escaped or hangs grep if not escaped. Both conditions must be avoided
in order to report that the kernel supports the filesystem named as
the string.
{
fstype="${1}"
+ # Validate input first
+ if [ -z "${fstype}" ]
+ then
+ return 1
+ fi
+
# Try to look if it is already supported by the kernel
if grep -q ${fstype} /proc/filesystems
then