1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-05-31 14:56:58 +02:00
Commit Graph

119 Commits

Author SHA1 Message Date
Jim Meyering 44d59bb168 Update FSF postal mail address. 2005-05-14 07:58:31 +00:00
Jim Meyering c0c815af8d Update FSF postal mail address. 2005-05-14 06:57:06 +00:00
Paul Eggert e8a0c946f5 (usage): Add examples. 2005-04-05 22:21:50 +00:00
Jim Meyering 6705c31311 (long_options): Use NULL, not `0'. 2005-03-28 17:47:48 +00:00
Paul Eggert 81ca57a91d Remove unused "case 0". 2004-09-21 22:26:42 +00:00
Paul Eggert bbc2ac99c1 (parse_group): Return gid_t rather than storing it
through a pointer.  Treat "chgrp '' file" as a no-op change,
as FreeBSD does.
(main): Set chopt.group_name to NULL if the group is the empty
string.
2004-08-19 20:02:46 +00:00
Paul Eggert a830ae0cbb (parse_group): Require base 10 when parsing groups as integers.
(main): int -> bool when appropriate.
2004-07-28 23:36:59 +00:00
Jim Meyering 1ce7b61d0e (main): Standardize on the diagnostics given when someone gives
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.
2004-06-21 15:03:35 +00:00
Jim Meyering 5e1dd2ecb5 (main): Check for incompatible options. -R --dereference
requires either -H or -L, and -R -h requires -P.  If -H, specify
FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster.  Make this
file as much like chown.c as possible.
2004-06-08 13:40:00 +00:00
Jim Meyering 636a950344 chgrp and chown now dereference symlinks by default, per POSIX.
(usage): Update to reflect this.
2004-05-17 12:08:09 +00:00
Jim Meyering 1fcd62671b (usage): Use EXIT_SUCCESS, not 0, for clarity. 2004-01-21 22:43:51 +00:00
Jim Meyering b23e990800 (usage): Describe new options. 2003-11-09 21:04:20 +00:00
Jim Meyering cf4fdf373f Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
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.
2003-10-18 10:05:47 +00:00
Jim Meyering 029d5937c4 (main): Simply assign to bit_flags.
Don't bother with bit arithmetic.
2003-10-16 07:51:57 +00:00
Jim Meyering 0ebfdf25d1 Include "fts_.h".
(WRITTEN_BY): Add my name.
(MAXUID, MAXGID): Remove definitions.  Use GID_T_MAX instead of
the latter.
(usage): Update.
(main): Handle new options.
Call new function, chown_files rather than change_file_owner.
2003-10-15 21:21:29 +00:00
Jim Meyering bafd927f03 (WRITTEN_BY): Rename from AUTHORS.
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
2003-09-18 22:19:03 +00:00
Jim Meyering 6bcd4b08ba (main): Call initialize_main. 2003-06-17 18:13:23 +00:00
Jim Meyering 4006f4e672 Change exit (0)' to exit (EXIT_SUCCESS)',
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-31 08:52:10 +00:00
Jim Meyering 7488703199 Change error (1, ...' to error (EXIT_FAILURE, ...'. 2002-08-30 23:04:53 +00:00
Jim Meyering d23970e52e (usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it. 2002-07-02 09:05:33 +00:00
Jim Meyering 098bfeea80 (main):
Include the word `fail' in some diagnostics to make it clearer
that they indicate a failure.
s/getting attributes/failed to get attributes/
2001-12-11 11:49:36 +00:00
Jim Meyering f3ac2e7839 Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
instead of hard-coding --help and --version descriptions.
2001-12-02 22:26:57 +00:00
Jim Meyering b78de3e724 Split usage strings so that --help and --version
descriptions are alone in their own string.
2001-11-23 20:10:25 +00:00
Jim Meyering a5f1ced62a (usage): Split --help output into smaller pieces.
Use fputs, not printf.
2001-11-23 15:41:16 +00:00
Jim Meyering 3b7a24cc92 Do not include savedir.h; not used. 2001-08-31 09:11:04 +00:00
Jim Meyering 8c07ff563b (parse_group): Normalize spelling. 2001-01-07 09:21:34 +00:00
Jim Meyering 6c4cbe6b5f (main): Rename local, group, to gid. 2000-12-16 13:10:05 +00:00
Jim Meyering 0e81b6b48e (main): Reflect renaming: s/dereference/change_symlinks/. 2000-12-15 13:29:56 +00:00
Jim Meyering 5a795ec749 Include "chown-core.h".
[enum Change_status, enum Verbosity]: Remove declarations.
Remove decls of globals that are now part of struct Chown_option.
Remove decl of xstat.
(describe_change): Remove function.
(change_file_group): Likewise.
(change_dir_group): Likewise.
(parse_group): Don't set global, groupname, here...
(main): ... instead, initialize `chopt.group_name' here.
Initialize chopt and update uses of the now-members.
Set group_name also when it's obtained via a --reference=FILE option.
Call change_file_owner (with -1 for uids), not change_file_group.
2000-12-09 20:38:01 +00:00
Jim Meyering b53d6da640 Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
Add more precise diagnostics.
2000-07-30 16:16:16 +00:00
Jim Meyering d3938d3118 (change_file_group): Save errno from a possibly failed chown,
and use that later.  Otherwise, errno itself could be clobbered before used.
2000-07-25 22:22:29 +00:00
Jim Meyering db0cd2f7e6 (change_dir_group): Don't set errno before
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-27 13:09:57 +00:00
Jim Meyering 81b16373ae Arrange to call close_stdout only upon exit. 2000-05-13 06:49:53 +00:00
Jim Meyering 57bb960867 Declare lstat; needed on e.g. SunOS4.
Reported by Tom Tromey.
1999-11-20 09:50:58 +00:00
Jim Meyering 717d76cf4b (xstat): New global.
(main): Define it.
(change_file_group): Use it.  Before this change, when running chgrp
on a symlink without --dereference (-h) and when the requested group
is the same as the group for the *symlink*, chgrp would do nothing.
Now it changes the group of the file referenced through the symlink.
Reported by Martin Mitchell.
1999-11-07 20:18:11 +00:00
Jim Meyering 5907ad7277 Define and use REFERENCE_FILE_OPTION and
DEREFERENCE_OPTION in place of bare `CHAR_MAX + N'.
1999-11-07 20:02:19 +00:00
Jim Meyering 28c95e39c1 (usage): Tweak --help output to make it more consistent with that of chown. 1999-08-20 08:58:21 +00:00
Jim Meyering 4d22e13282 This change is nearly identical to the chown.c change of 1998-05-24
Accept new option, --dereference.
--no-dereference is now the default. Include lchown.h.
(enum Change_status) [CH_NOT_APPLIED]: New member.
(change_symlinks): Enable this by default, now.
(describe_change): Handle new case.
(change_file_group): Add new parameter: cmdline_arg.  Update callers.
Reorganize to reflect changed semantics.
(LCHOWN): Remove definitions.
From Bruno Haible.
1999-08-16 21:21:39 +00:00
Jim Meyering 08ae72e3a4 (change_dir_group): Remove cast of savedir arg. 1999-08-08 10:13:44 +00:00
Jim Meyering d3ffbea816 Include xstrtol.h, not obsolete file xstrtoul.h. 1999-04-18 23:18:09 +00:00
Jim Meyering 667799f7e2 Don't include closeout.h or version-etc.h explicitly. Now, they're included via sys2.h. 1999-03-31 05:59:13 +00:00
Jim Meyering c92de17d2f define and use AUTHORS 1999-03-26 05:17:17 +00:00
Jim Meyering 06303195c0 No longer include long-options.h.
Include version-etc.h instead.
(PROGRAM_NAME): Define.
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
1999-03-26 04:11:15 +00:00
Jim Meyering 04d1d85350 *** empty log message *** 1999-03-22 22:35:53 +00:00
Jim Meyering 61fa70ac19 Include long-options.h
[long_options]: Remove the "help" and "version" entries.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
1999-03-04 05:09:05 +00:00
Jim Meyering 07c6f5e387 update copyright dates 1999-02-16 04:14:17 +00:00
Jim Meyering 410a3c94e8 (usage): Don't make it static so that it can be called from libfu.a by xargmatch. 1999-01-16 15:33:16 +00:00
Jim Meyering e28821d5f8 (MAXGID): Define.
Use gid_t (not int) as the type for `group' variables.
(parse_group): Use MAXGID, not INT_MAX.
1998-12-18 14:07:58 +00:00
Jim Meyering 08cfef16a2 update bug-reporting address 1998-09-19 17:17:58 +00:00
Jim Meyering 38429fe661 (long_options): Replace 12 with CHAR_MAX + 1. 1998-08-30 03:02:53 +00:00