From: Arkadiusz Miƛkiewicz Date: Thu, 9 Dec 2021 16:05:34 +0000 (+0100) Subject: Open target file in read only mode (fixes case of running it from non-root for root... X-Git-Tag: auto/th/xfsprogs-5.14.2-2~2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fxfsprogs.git;a=commitdiff_plain;h=9f476f9 Open target file in read only mode (fixes case of running it from non-root for root owned files etc). --- diff --git a/xfs_lsprojid b/xfs_lsprojid index 75a847d..ff630a4 100644 --- a/xfs_lsprojid +++ b/xfs_lsprojid @@ -2,7 +2,7 @@ # simple wrapper to show project id for specified paths, arekm@maven.pl 20111117 -xfs_io -p "$0" -c "stat" $@ | awk ' +xfs_io -r -p "$0" -c "stat" $@ | awk ' /^fd\.path =/ { projid=""; path=$3; gsub(/^\"/, "", path); gsub(/\"$/, "", path); } /^fsxattr\.projid =/ { projid=$3; print path ": " projid; } '