]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Make chgrp and chown diagnostics consistent.
authorJim Meyering <jim@meyering.net>
Sat, 16 Jun 2007 10:53:40 +0000 (12:53 +0200)
committerJim Meyering <jim@meyering.net>
Sat, 16 Jun 2007 10:53:40 +0000 (12:53 +0200)
* src/chown.c (main): Emit the diagnostic before the file name,
not after it, to be consistent with chgrp's diagnostic.
* src/chgrp.c (parse_group): Emit a ":" between the diagnostic
and the file name.
Reported by Egmont Koblinger.
* THANKS: Add Egmont Koblinger.

ChangeLog
THANKS
src/chgrp.c
src/chown.c

index f456c6afbf997d15fbc9f576c1066fb44850136b..e68c7ed33b91cc0d2bf3423de803e107a34c9727 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-06-16  Jim Meyering  <jim@meyering.net>
+
+       Make chgrp and chown diagnostics consistent.
+       * src/chown.c (main): Emit the diagnostic before the file name,
+       not after it, to be consistent with chgrp's diagnostic.
+       * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
+       and the file name.
+       Reported by Egmont Koblinger.
+       * THANKS: Add Egmont Koblinger.
+
 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
 
        Correct cp's handling of destination symlinks in some cases.
diff --git a/THANKS b/THANKS
index c86dab72efce8dfef96fc0d0ca50ae39da4aa08c..cd5efaeab5801ca4706ea5e95f39f9a7cdf93029 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -141,6 +141,7 @@ Duncan Roe                          duncanr@optimation.com.au
 Ed Avis                             ed@membled.com
 Edward Welbourne                    eddy@opera.com
 Edzer Pebesma                       Edzer.Pebesma@rivm.nl
+Egmont Koblinger                    egmont@uhulinux.hu
 Eirik Fuller                        eirik@hackrat.com
 Eivind                              eivindt@multinet.no
 Eli Zaretskii                       eliz@is.elta.co.il
index 1778a8d69aea6cdc8abe4f4e9499649431a56e6b..0560aa44682139fb069c27436a4c5af9f6ae6153 100644 (file)
@@ -1,5 +1,5 @@
 /* chgrp -- change group ownership of files
-   Copyright (C) 89, 90, 91, 1995-2006 Free Software Foundation, Inc.
+   Copyright (C) 89, 90, 91, 1995-2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -92,7 +92,7 @@ parse_group (const char *name)
          unsigned long int tmp;
          if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK
                 && tmp <= GID_T_MAX))
-           error (EXIT_FAILURE, 0, _("invalid group %s"), quote (name));
+           error (EXIT_FAILURE, 0, _("invalid group: %s"), quote (name));
          gid = tmp;
        }
       endgrent ();             /* Save a file descriptor. */
index 29b75a251954cfe622fa6bc9d48aa79c9d9d6a68..8ad76184ad81a1583b3eb3fbddb6dbaa162758fb 100644 (file)
@@ -1,5 +1,5 @@
 /* chown -- change user and group ownership of files
-   Copyright (C) 89, 90, 91, 1995-2006 Free Software Foundation, Inc.
+   Copyright (C) 89, 90, 91, 1995-2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -239,7 +239,7 @@ main (int argc, char **argv)
                                             &required_uid, &required_gid,
                                             &u_dummy, &g_dummy);
            if (e)
-             error (EXIT_FAILURE, 0, "%s: %s", quote (optarg), e);
+             error (EXIT_FAILURE, 0, "%s: %s", e, quote (optarg));
            break;
          }
 
@@ -308,7 +308,7 @@ main (int argc, char **argv)
       const char *e = parse_user_spec (argv[optind], &uid, &gid,
                                       &chopt.user_name, &chopt.group_name);
       if (e)
-        error (EXIT_FAILURE, 0, "%s: %s", quote (argv[optind]), e);
+        error (EXIT_FAILURE, 0, "%s: %s", e, quote (argv[optind]));
 
       /* If a group is specified but no user, set the user name to the
         empty string so that diagnostics say "ownership :GROUP"