fi
}
+_link_out_file_named()
+{
+ export FEATURES=$2
+ SUFFIX=$(perl -e '
+ my %feathash;
+ my $feature, $result, $suffix, $opts;
+
+ foreach $feature (split(/,/, $ENV{"FEATURES"})) {
+ $feathash{$feature} = 1;
+ }
+ $result = "default";
+ while (<>) {
+ my $found = 1;
+
+ chomp;
+ ($opts, $suffix) = split(/ *: */);
+ foreach my $opt (split(/,/, $opts)) {
+ if (!exists($feathash{$opt})) {
+ $found = 0;
+ last;
+ }
+ }
+ if ($found == 1) {
+ $result = $suffix;
+ last;
+ }
+ }
+ print $result
+ ' <$seqfull.cfg)
+ rm -f $1
+ SRC=$(basename $1)
+ ln -fs $SRC.$SUFFIX $1
+}
+
_link_out_file()
{
- if [ -z "$1" -o -z "$2" ]; then
- echo Error must pass src and dst.
- exit
+ if [ $# -eq 0 ]; then
+ FEATURES="$(_get_os_name)"
+ if [ -n "$MOUNT_OPTIONS" ]; then
+ FEATURES=$FEATURES,${MOUNT_OPTIONS##"-o "}
+ fi
+ else
+ FEATURES=$1
fi
- rm -f $2
- SUFFIX=$(_get_os_name())
- ln -s $1.$SUFFIX $2
+
+ _link_out_file_named $seqfull.out "$FEATURES"
}
_die()
}
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs generic
--- /dev/null
+irix: irix
+linux: linux
_require_v2log
# link correct .out file
-_link_out_file $seq.op $seqfull.op
+_link_out_file_named $seqfull.op $(_get_os_name)
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
--- /dev/null
+irix: irix
+linux: linux
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
--- /dev/null
+irix: irix
+linux: linux
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
--- /dev/null
+irix: irix
+linux: linux
. ./common/repair
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# nuke the superblock, AGI, AGF, AGFL; then try repair the damage
#
--- /dev/null
+irix: irix
+linux: linux
. ./common/filter
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
_check_repair()
{
--- /dev/null
+irix: irix
+linux: linux
_scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
# link correct .out file
+FEATURES=$(_get_os_name)
if [ $_fs_has_crcs -eq 1 ]; then
- _link_out_file $seq.crc.out $seqfull.out
-else
- _link_out_file $seq.out $seqfull.out
+ FEATURES=$FEATURES,crc
fi
+_link_out_file_named $seqfull.out "$FEATURES"
`xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
sed -e 's/ //g' -e 's/^/export /'`
--- /dev/null
+irix: irix
+linux,crc: crc.linux
+linux: linux
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
--- /dev/null
+irix: irix
+linux: linux
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
--- /dev/null
+irix: irix
+linux: linux
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
--- /dev/null
+irix: irix
+linux: linux
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
--- /dev/null
+irix: irix
+linux: linux
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
_require_v2log
# link correct .out file
-_link_out_file $seq.op $seqfull.op
+_link_out_file_named $seqfull.op $(_get_os_name)
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
--- /dev/null
+irix: irix
+linux: linux
_supported_os Linux IRIX
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
_require_scratch
_scratch_mkfs_xfs >/dev/null 2>&1
--- /dev/null
+irix: irix
+linux: linux