Age | Commit message (Collapse) | Author |
|
|
|
|
|
its clients accordingly -- note that du.c uses fts but doesn't need
any adjustment, since it doesn't operate on the actual files,
but rather just uses the stat buffers provided by fts.
Include "openat.h".
(process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
|
|
|
|
|
|
|
|
(diagnose_surprises): New var.
(process_file): Diagnose surprises. Simplify the logic a bit,
while we're at it.
(main): Prepare to diagnose surprises. Remove useless code for
'-' option.
|
|
(reference_file): Move this static var to inside "main".
(process_file, process_files): Remove CHANGES arg; now taken from
static var. All uses changed.
(usage): Fix incorrect description of MODE operand.
(main): For invalid mode usages, output a brief usage message.
Adjust to new modechange API.
|
|
|
|
|
|
|
|
when appropriate.
|
|
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
|
|
|
|
particular, a no-op chown is no longer reported as a change; this
reverts to previous behavior. Also, fix both commands so that -v
report failures even if the failure is not due to the chmod or
chown syscalls.
* src/chmod.c (CH_NOT_APPLIED): New constant.
(describe_change): Handle it.
(process_file): Use it, if a symlink wasn't changed.
(mode_changed): Return bool, not int. Accept new argument
NEW_MODE; all callers changed. This lets us avoid statting the
file unless the new mode has unusual bits.
(process_file): Return -1 on error. With -v, report all errors
verbosely, not just some.
|
|
|
|
|
|
|
|
(process_file): Use newly-factored-out ROOT_DEV_INO_CHECK and
ROOT_DEV_INO_WARN macros.
(get_root_dev_ino): Remove function definition, now that it's
been moved to a separate file.
|
|
|
|
specified. Before, it operated on full path names, and as such
would encounter the PATH_MAX (often 4096) limit.
Include "xfts.h".
(process_file): Rename from change_file_mode.
Adapt to be used with fts.
(process_files): New function.
|
|
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.
* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
|
|
(change_file_mode): Honor new option.
(change_file_mode): Strip trailing slashes on directory
argument passed to change_dir_mode.
(get_root_dev_ino): New function.
(main): Initialize global, root_dev_ino.
|
|
S_ISLNK. The S_IS* macros are guaranteed to be defined
via system.h.
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
|
|
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
|
|
|
|
Include the word `fail' in some diagnostics to make it clearer
that they indicate a failure.
s/getting attributes/failed to get attributes/
|
|
instead of hard-coding --help and --version descriptions.
|
|
descriptions are alone in their own string.
|
|
Use fputs, not printf.
|
|
Don't include "dirname.h" when no longer needed.
|
|
|
|
|
|
There's no need to invoke both lstat and stat here, so call just
one of the two functions.
|
|
(change_file_mode): Use it to determine accurately when -c should
make chmod announce there's been a change.
|
|
|
|
file mode permission bits are the same as those that should be set.
Omitting the chmod call would be alright with minimal 1003.1e DS17
ACLs, but eventually there will be other permissions in addition to
rwx. E.g., add and delete for directories, and something analogous
to NT's take ownership permission.
|
|
|
|
corresponding argument in a `quote (...)' call.
Add more precise diagnostics.
|
|
and use that later. Otherwise, errno itself could be clobbered before used.
|
|
invoking savedir, and assume that errno is nonzero if savedir fails.
|
|
|
|
|
|
|
|
Don't assume the traditional Unix values for mode bits.
|