@end macro
@chownFromOption{chown}
+@macro symlinkRefOpts
@item --dereference
@opindex --dereference
-@cindex symbolic links, changing owner
+@cindex symbolic links, changing owner, group
@findex lchown
Do not act on symbolic links themselves but rather on what they point to.
This is the default when not operating recursively.
Act on symbolic links themselves instead of what they point to.
This mode relies on the @code{lchown} system call.
On systems that do not provide the @code{lchown} system call,
-@command{chown} fails when a file specified on the command line
-is a symbolic link.
-By default, no diagnostic is issued for symbolic links encountered
-during a recursive traversal, but see @option{--verbose}.
+no diagnostic is issued, but see @option{--verbose}.
+@end macro
+@symlinkRefOpts
@item --preserve-root
@opindex --preserve-root
@chownFromOption{chgrp}
-@item --dereference
-@opindex --dereference
-@cindex symbolic links, changing owner
-@findex lchown
-Do not act on symbolic links themselves but rather on what they point to.
-This is the default when not operating recursively.
-@warnOptDerefWithRec
-
-@item -h
-@itemx --no-dereference
-@opindex -h
-@opindex --no-dereference
-@cindex symbolic links, changing group
-@findex lchown
-Act on symbolic links themselves instead of what they point to.
-This mode relies on the @code{lchown} system call.
-On systems that do not provide the @code{lchown} system call,
-@command{chgrp} fails when a file specified on the command line
-is a symbolic link.
-By default, no diagnostic is issued for symbolic links encountered
-during a recursive traversal, but see @option{--verbose}.
+@symlinkRefOpts
@item --preserve-root
@opindex --preserve-root
/* Ignore any error due to lack of support; POSIX requires
this behavior for top-level symbolic links with -h, and
implies that it's required for all symbolic links. */
- if (!ok && errno == EOPNOTSUPP)
+ if (!ok && is_ENOTSUP (errno))
{
ok = true;
symlink_changed = false;