~vcs-imports/busybox/trunk

Viewing all changes in revision 16428.

  • Committer: Denys Vlasenko
  • Author(s): Liu, Shuang (ADITG/ESM)
  • Date: 2019-11-17 16:06:31 UTC
  • Revision ID: git-v1:af6bc54fdefabae9ca433e515f7f1aa050184c9a
chgrp: correct the usage for non-desktop chgrp calls

When IF_DESKTOP is not defined, chown and chgrp only takes option -R -h,
However the usage output of chgrp is wrong:

        $ ./busybox.nosuid chown
        Usage: chown [-Rh]... USER[:[GRP]] FILE...

        $ ./busybox.nosuid chgrp
        Usage: chgrp [-RhLHP]... GROUP FILE...

        $ ./busybox.nosuid chgrp -H group dummy
        chgrp: invalid option -- 'H'
        Usage: chgrp [-RhLHP]... GROUP FILE...

The chgrp is now a wrapper of chown, so the recognized options shall be the same.
This is introduced by 34425389e09353a8dacdd6b23a62553f699c544c

I would expect the correct behavior shall be the same as chown.
So suggest the below patch, the behavior shall be:

        $ ./busybox.nosuid chgrp
        Usage: chgrp [-Rh]... GROUP FILE...

Signed-off-by: Shuang Liu <sliu@de.adit-jv.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: