mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-09 02:04:06 +02:00
(rpl_chown): Return -1 on failure.
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user