common: Remove unused functions

Functions like _mount_opts(), _mkfs_opts() and _fsck_opts() are
defined both in common/rc and common/config while used only in
common/config.

Remove those functions from common/rc and update _mount_opts() to match
the superior version of the function.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Lukas Czerner
2014-04-22 10:46:25 +10:00
committed by Dave Chinner
parent 7f783df2fa
commit 9631a1fc06
2 changed files with 4 additions and 87 deletions
+4
View File
@@ -249,6 +249,10 @@ _mount_opts()
# acls aren't turned on by default on gfs2
export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
;;
tmpfs)
# We need to specify the size at mount, use 512 MB by default
export MOUNT_OPTIONS="-o size=512M $TMPFS_MOUNT_OPTIONS"
;;
*)
;;
esac
-87
View File
@@ -81,93 +81,6 @@ _ls_l()
ls -l $* | sed "s/\(^[-rwxdlbcpsStT]*\)\. /\1 /" | grep -v 'lost+found'
}
_mount_opts()
{
# SELinux adds extra xattrs which can mess up our expected output.
# So, mount with a context, and they won't be created
# nfs_t is a "liberal" context so we can use it.
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
SELINUX_MOUNT_OPTIONS="-o context=system_u:object_r:nfs_t:s0"
export SELINUX_MOUNT_OPTIONS
fi
case $FSTYP in
xfs)
export MOUNT_OPTIONS=$XFS_MOUNT_OPTIONS
;;
udf)
export MOUNT_OPTIONS=$UDF_MOUNT_OPTIONS
;;
nfs)
export MOUNT_OPTIONS=$NFS_MOUNT_OPTIONS
;;
ext2|ext3|ext4|ext4dev)
# acls & xattrs aren't turned on by default on ext$FOO
export MOUNT_OPTIONS="-o acl,user_xattr $EXT_MOUNT_OPTIONS"
;;
reiserfs)
# acls & xattrs aren't turned on by default on reiserfs
export MOUNT_OPTIONS="-o acl,user_xattr $REISERFS_MOUNT_OPTIONS"
;;
gfs2)
# acls aren't turned on by default on gfs2
export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
;;
tmpfs)
# We need to specify the size at mount, use 512 MB by default
export MOUNT_OPTIONS="-o size=512M $TMPFS_MOUNT_OPTIONS"
;;
*)
;;
esac
}
_mkfs_opts()
{
case $FSTYP in
xfs)
export MKFS_OPTIONS=$XFS_MKFS_OPTIONS
;;
udf)
[ ! -z "$udf_fsize" ] && \
UDF_MKFS_OPTIONS="$UDF_MKFS_OPTIONS -s $udf_fsize"
export MKFS_OPTIONS=$UDF_MKFS_OPTIONS
;;
nfs)
export MKFS_OPTIONS=$NFS_MKFS_OPTIONS
;;
reiserfs)
export MKFS_OPTIONS="$REISERFS_MKFS_OPTIONS -q"
;;
gfs2)
export MKFS_OPTIONS="$GFS2_MKFS_OPTIONS -O -p lock_nolock"
;;
jfs)
export MKFS_OPTIONS="$JFS_MKFS_OPTIONS -q"
;;
tmpfs)
export MKFS_OPTIONS="$TMPFS_MKFS_OPTIONS"
;;
*)
;;
esac
}
_fsck_opts()
{
case $FSTYP in
ext2|ext3|ext4|ext4dev)
export FSCK_OPTIONS="-nf"
;;
reiserfs)
export FSCK_OPTIONS="--yes"
;;
*)
export FSCK_OPTIONS="-n"
;;
esac
}
# we need common/config
if [ "$iam" != "check" ]
then