@@ -281,10 +281,10 @@ _xfs_check()
{
OPTS=" "
DBOPTS=" "
- USAGE="Usage: xfs_check [-fsvV] [-l logdev] [-i ino]... [-b bno]... special"
+ USAGE="Usage: xfs_check [-fsvV] [-l logdev] [-R rtdev] [-i ino]... [-b bno]... special"
OPTIND=1
- while getopts "b:fi:l:stvV" c; do
+ while getopts "b:fi:l:stvVR:" c; do
case $c in
s) OPTS=$OPTS"-s ";;
t) OPTS=$OPTS"-t ";;
@@ -296,12 +296,14 @@ _xfs_check()
V) $XFS_DB_PROG -p xfs_check -V
return $?
;;
+ R) DBOPTS="$DBOPTS -R $OPTARG";;
esac
done
set -- extra $@
shift $OPTIND
case $# in
- 1) ${XFS_DB_PROG}${DBOPTS} -F -i -p xfs_check -c "check$OPTS" $1
+ 1) echo "${XFS_DB_PROG}${DBOPTS} -F -i -p xfs_check -c check$OPTS $1" >> /dev/ttyprintk
+ ${XFS_DB_PROG}${DBOPTS} -F -i -p xfs_check -c "check$OPTS" $1
status=$?
;;
2) echo $USAGE 1>&1
@@ -339,6 +341,11 @@ _scratch_xfs_db_options()
SCRATCH_OPTIONS=""
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
+ if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_RTDEV" ]; then
+ $XFS_DB_PROG --help 2>&1 | grep -q -- '-R rtdev' || \
+ _notrun 'xfs_db does not support rt devices'
+ SCRATCH_OPTIONS="$SCRATCH_OPTIONS -R$SCRATCH_RTDEV"
+ fi
echo $SCRATCH_OPTIONS $* $SCRATCH_DEV
}
@@ -403,6 +410,11 @@ _scratch_xfs_check()
SCRATCH_OPTIONS="-l $SCRATCH_LOGDEV"
[ "$LARGE_SCRATCH_DEV" = yes ] && \
SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
+ if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_RTDEV" ]; then
+ $XFS_DB_PROG --help 2>&1 | grep -q -- '-R rtdev' || \
+ _notrun 'xfs_db does not support rt devices'
+ SCRATCH_OPTIONS="$SCRATCH_OPTIONS -R$SCRATCH_RTDEV"
+ fi
_xfs_check $SCRATCH_OPTIONS $* $SCRATCH_DEV
}