(rpl_chown): Return -1 on failure.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 May 2005 22:48:08 +0000 (22:48 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 May 2005 22:48:08 +0000 (22:48 +0000)
lib/chown.c

index 22272bd..ae6a504 100644 (file)
@@ -1,6 +1,6 @@
 /* provide consistent interface to chown for systems that don't interpret
    an ID of -1 as meaning `don't change the corresponding ID'.
-   Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2004, 2005 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
@@ -53,7 +53,7 @@ rpl_chown (const char *file, uid_t uid, gid_t gid)
 
       /* Stat file to get id(s) that should remain unchanged.  */
       if (stat (file, &file_stats))
-       return 1;
+       return -1;
 
       if (gid == (gid_t) -1)
        gid = file_stats.st_gid;