On Wed, 10 Nov 2010 18:14:04 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
On Wed, 10 Nov 2010 20:02:53 +0200 Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
Why fake 0 errno as EIO? g_file_set_contents() doesn't, and *strerror() returns something for 0, usually "Error 0".
GLib says to use g_strerror, which says 'Success', which is confusing.
It is, but "Input/output error" usually means a failed disk. (o_O) POSIX says "Some physical input or output error has occurred."
Mind if I try to improve the error handling, using gfileutils.c as a source? There will be 3 new translation strings.
Sure, have a go.
Here. errno 0 still displays "Success" at the end of the messages, but at least they start "Failed to"... Well, it's identical to glib, including the paranoid resetting of errno before each call.
Tested with writing to /boza, full disk and a fake close error.