In the current check script the -g option assumes only one group is given. With this patch, the -g option
understands comma separated multiple groups as the argument as well. Existing scripts are not affected
by this patch.
Reviewed-by: Dave Chinner <david@xxxxxxxxxx>
Signed-off-by: Itaru Kitayama <itaru.kitayama@xxxxxxxxx>
---
check | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/check b/check
index a79747e..0e0f208 100755
--- a/check
+++ b/check
@@ -164,18 +164,19 @@ while [ $# -gt 0 ]; do
-nfs) FSTYP=nfs ;;
-g) group=$2 ; shift ;
- group_list=$(get_group_list $group)
- if [ -z "$group_list" ]; then
- echo "Group \"$group\" is empty or not defined?"
- exit 1
- fi
-
- [ ! -s $tmp.list ] && touch $tmp.list
- for t in $group_list; do
- grep -s "^$t\$" $tmp.list >/dev/null || \
- echo "$t" >>$tmp.list
+ for g in ${group//,/ }; do
+ group_list=$(get_group_list $g)
+ if [ -z "$group_list" ]; then
+ echo "Group \"$g\" is empty or not defined?"
+ exit 1
+ fi
+
+ [ ! -s $tmp.list ] && touch $tmp.list
+ for t in $group_list; do
+ grep -s "^$t\$" $tmp.list >/dev/null || \
+ echo "$t" >>$tmp
+ done
done
-
;;
-x) xgroup=$2 ; shift ;
On Tue, May 21, 2013 at 9:45 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
On Mon, May 20, 2013 at 08:42:35PM +0900, Itaru Kitayama wrote:Agreed, it does read better and is easily to type.
> Yes, we can do that, but I just thought as you originally proposed last year
>
> -g rw,attr reads better.
That's what you need to put in the commit message - why it is better
than what we currently have, and whether it is badwards compatible
or not (doesn't break any existing scripts). i.e. the commit
message is for telling people -why- the change should be made as we
can look at the code to determine -what- the change is. ;)
_______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs