mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Merge of xfs-cmds-2.4.18:slinx:112579a by nathans.
getfattr -a --> --absolute-names.
This commit is contained in:
@@ -81,7 +81,7 @@ _attr_list()
|
||||
file=$1
|
||||
|
||||
echo " *** print attributes"
|
||||
if ! _getfattr -ad -e text $file
|
||||
if ! _getfattr -d -e text --absolute-names $file
|
||||
then
|
||||
echo " !!! error return"
|
||||
return 1
|
||||
@@ -142,7 +142,7 @@ done
|
||||
|
||||
echo "*** check"
|
||||
# don't print it all out...
|
||||
getfattr -a $testfile \
|
||||
getfattr --absolute-names $testfile \
|
||||
| tee -a $seq.full \
|
||||
| $AWK_PROG '
|
||||
/^#/ { next }
|
||||
|
||||
@@ -103,7 +103,7 @@ echo "*** make test file 1"
|
||||
touch $testfile.1
|
||||
echo "v1" | _attr -s "a1" $testfile.1 >/dev/null
|
||||
echo "v2--" | _attr -s "a2--" $testfile.1 >/dev/null
|
||||
_getfattr -a $testfile.1
|
||||
_getfattr --absolute-names $testfile.1
|
||||
inum_1=`ls -li $testfile.1 | $AWK_PROG '{ print $1 }'`
|
||||
|
||||
echo "*** make test file 2"
|
||||
@@ -113,7 +113,7 @@ echo "value_1" | _attr -s "a1" $testfile.2 >/dev/null
|
||||
echo "value_2" | _attr -s "a2-----" $testfile.2 >/dev/null
|
||||
(echo start ; dd if=/dev/zero bs=65525 count=1 ; echo end ) \
|
||||
| _attr -s "a3" $testfile.2 >/dev/null
|
||||
_getfattr -a $testfile.2
|
||||
_getfattr --absolute-names $testfile.2
|
||||
|
||||
# print name and size from 1st line of output
|
||||
_attr -g "a3" $testfile.2 | head -1
|
||||
|
||||
@@ -66,7 +66,7 @@ _filter_scratch()
|
||||
|
||||
getfattr()
|
||||
{
|
||||
/usr/bin/getfattr -adh $@ 2>&1 | _filter_scratch
|
||||
/usr/bin/getfattr --absolute-names -dh $@ 2>&1 | _filter_scratch
|
||||
}
|
||||
|
||||
setfattr()
|
||||
@@ -182,7 +182,7 @@ echo; echo
|
||||
_backup()
|
||||
{
|
||||
# NB: no filtering of scratch here... (need to restore too)
|
||||
/usr/bin/getfattr -adh -R -m '^user|^system' $SCRATCH_MNT >$1
|
||||
/usr/bin/getfattr --absolute-names -dh -R -m '^user|^system' $SCRATCH_MNT >$1
|
||||
echo BACKUP $1 >>$seq.full
|
||||
cat $1 >> $seq.full
|
||||
[ ! -s $1 ] && echo "warning: $1 (backup file) is empty"
|
||||
|
||||
+1
-1
@@ -1152,7 +1152,7 @@ _get_eas_on_path()
|
||||
# sed 's/["]//g' |\
|
||||
# sort |\
|
||||
# and this is now the Linux way...
|
||||
getfattr -Rha $_path |\
|
||||
getfattr --absolute-names -Rh $_path |\
|
||||
perl -wn -e '
|
||||
if (m/^# file: (\S+)/) { $file = $1 }
|
||||
elsif (m/^user\.(\w+)/) { print $file, " ",$1,"\n" }' |\
|
||||
|
||||
Reference in New Issue
Block a user