commit 9f476f9567e0de93fe65018c0be13c068a9737c0
Author: Arkadiusz MiĆkiewicz <[email protected]>
Date: Thu Dec 9 17:05:34 2021 +0100
Open target file in read only mode (fixes case of running it from non-root
for root owned files etc).
xfs_lsprojid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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, [email protected]
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; }
'
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xfsprogs.git/commitdiff/9f476f9567e0de93fe65018c0be13c068a9737c0
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit