From 9a0b07f225be10c545a8b1de8555bca2dc3a9cab Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 26 Jan 2003 16:11:11 +0000 Subject: 2003-01-26 Havoc Pennington * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function * dbus/dbus-errors.c (dbus_result_to_string): add file errors * dbus/dbus-message-builder.c: new file, will contain code to load up messages from files. Not implemented yet. --- dbus/dbus-internals.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-internals.c') diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c index 8413ac00..eed91d14 100644 --- a/dbus/dbus-internals.c +++ b/dbus/dbus-internals.c @@ -196,6 +196,9 @@ _dbus_strerror (int error_number) /** * Converts a UNIX errno into a DBusResultCode. * + * @todo should cover more errnos, specifically those + * from open(). + * * @param error_number the errno. * @returns the result code. */ @@ -274,7 +277,15 @@ _dbus_result_from_errno (int error_number) #ifdef EADDRINUSE case EADDRINUSE: return DBUS_RESULT_ADDRESS_IN_USE; -#endif +#endif +#ifdef EEXIST + case EEXIST: + return DBUS_RESULT_FILE_NOT_FOUND; +#endif +#ifdef ENOENT + case ENOENT: + return DBUS_RESULT_FILE_NOT_FOUND; +#endif } return DBUS_RESULT_FAILED; -- cgit