common: Remove unused functions
authorLukas Czerner <lczerner@redhat.com>
Tue, 22 Apr 2014 00:46:25 +0000 (10:46 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 22 Apr 2014 00:46:25 +0000 (10:46 +1000)
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>
common/config
common/rc

index 49f34cf4d8dd4d64094378edd9ca4c98f9e8724b..e8bcf485e1e9e9318490a5b0c975635274175f66 100644 (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
index a9d1c4c53b72e41fb213d2df8041187db54dd9c5..1d2ccb95ab7aeb93d0597ec5174245cd66328f0f 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -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