]> git.ipfire.org Git - thirdparty/coreutils.git/commit
remove.c: accommodate systems with negative errno values
authorJim Meyering <jim@meyering.net>
Mon, 24 Mar 2008 16:38:27 +0000 (17:38 +0100)
committerJim Meyering <meyering@redhat.com>
Sun, 6 Apr 2008 07:26:32 +0000 (09:26 +0200)
commit9982e26c12ffae9bbe96eb3ea260d680ab2584a2
treec36c6a86672c01cd670b49b10e87340bcd77af63
parent2741677b281d66eb33784c7e80c7dec6223b543d
remove.c: accommodate systems with negative errno values

This is required at least on Haiku and BeOS.
* src/remove.c (write_protected_non_symlink): Return 1 for a write-
protected non-symlink, 0 if we determine it's not, and -1 upon
error (setting errno accordingly only in this final case).
(prompt): Deal with the changed semantics of the above function.
Based on this patch from Axel Dörfler:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13071
THANKS
src/remove.c