Mail Archives: djgpp-workers/2003/02/03/05:51:15
Hello.
fchown is supposed to return -1 on failure. Below is a patch
to make it do that.
If there are no objections, I will commit this patch at the weekend.
Bye, Rich =]
Index: src/libc/compat/unistd/fchown.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/unistd/fchown.c,v
retrieving revision 1.2
diff -p -u -3 -r1.2 fchown.c
--- src/libc/compat/unistd/fchown.c 14 Jun 2002 14:24:39 -0000 1.2
+++ src/libc/compat/unistd/fchown.c 3 Feb 2003 10:49:49 -0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
#include <libc/stubs.h>
#include <stdarg.h>
@@ -18,5 +19,5 @@ int fchown(int fd, uid_t owner, gid_t gr
if (__FSEXT_func_wrapper(func, __FSEXT_fchown, &rv, fd, owner, group))
return rv;
}
- return (_get_dev_info(fd) == -1) ? 1 : 0;
+ return (_get_dev_info(fd) == -1) ? -1 : 0;
}
- Raw text -