From 981fe434ee9c9a8a3336cbc0ebf13740d86291d4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 27 Aug 2004 14:57:34 +0000 Subject: [PATCH] Fix #151193, Stepan Kasal: 2004-08-27 Matthias Clasen Fix #151193, Stepan Kasal: * glib/gfileutils.c (g_file_error_from_errno): * glib/gfileutils.h (enum GFileError): Add G_FILE_ERROR_NOSYS. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ docs/reference/ChangeLog | 4 ++++ docs/reference/glib/tmpl/fileutils.sgml | 2 ++ glib/gfileutils.c | 8 +++++++- glib/gfileutils.h | 1 + 9 files changed, 49 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 70558801..c4fe5544 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-08-27 Matthias Clasen + + Fix #151193, Stepan Kasal: + + * glib/gfileutils.c (g_file_error_from_errno): + * glib/gfileutils.h (enum GFileError): Add G_FILE_ERROR_NOSYS. + Fri Aug 27 00:45:41 2004 Matthias Clasen * glib/goption.c (g_option_context_parse): Set the program name diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 70558801..c4fe5544 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2004-08-27 Matthias Clasen + + Fix #151193, Stepan Kasal: + + * glib/gfileutils.c (g_file_error_from_errno): + * glib/gfileutils.h (enum GFileError): Add G_FILE_ERROR_NOSYS. + Fri Aug 27 00:45:41 2004 Matthias Clasen * glib/goption.c (g_option_context_parse): Set the program name diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 70558801..c4fe5544 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +2004-08-27 Matthias Clasen + + Fix #151193, Stepan Kasal: + + * glib/gfileutils.c (g_file_error_from_errno): + * glib/gfileutils.h (enum GFileError): Add G_FILE_ERROR_NOSYS. + Fri Aug 27 00:45:41 2004 Matthias Clasen * glib/goption.c (g_option_context_parse): Set the program name diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 70558801..c4fe5544 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +2004-08-27 Matthias Clasen + + Fix #151193, Stepan Kasal: + + * glib/gfileutils.c (g_file_error_from_errno): + * glib/gfileutils.h (enum GFileError): Add G_FILE_ERROR_NOSYS. + Fri Aug 27 00:45:41 2004 Matthias Clasen * glib/goption.c (g_option_context_parse): Set the program name diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 70558801..c4fe5544 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2004-08-27 Matthias Clasen + + Fix #151193, Stepan Kasal: + + * glib/gfileutils.c (g_file_error_from_errno): + * glib/gfileutils.h (enum GFileError): Add G_FILE_ERROR_NOSYS. + Fri Aug 27 00:45:41 2004 Matthias Clasen * glib/goption.c (g_option_context_parse): Set the program name diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index c77c05a6..3e77f7ef 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +2004-08-27 Matthias Clasen + + * glib/tmpl/fileutils.sgml: Add G_FILE_ERROR_NOSYS. + 2004-08-25 Matthias Clasen * === Released 2.5.2 === diff --git a/docs/reference/glib/tmpl/fileutils.sgml b/docs/reference/glib/tmpl/fileutils.sgml index d3037825..d0780e7a 100644 --- a/docs/reference/glib/tmpl/fileutils.sgml +++ b/docs/reference/glib/tmpl/fileutils.sgml @@ -93,6 +93,8 @@ differences in when a system will report a given error, etc. @G_FILE_ERROR_PERM: Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation. +@G_FILE_ERROR_NOSYS: Function not implemented; this indicates that the + system is missing some functionality. @G_FILE_ERROR_FAILED: Does not correspond to a UNIX error code; this is the standard "failed for unspecified reason" error code present in all #GError error code enumerations. Returned if no specific diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 05e4f362..061b3214 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -348,7 +348,13 @@ g_file_error_from_errno (gint err_no) return G_FILE_ERROR_PERM; break; #endif - + +#ifdef ENOSYS + case ENOSYS: + return G_FILE_ERROR_NOSYS; + break; +#endif + default: return G_FILE_ERROR_FAILED; break; diff --git a/glib/gfileutils.h b/glib/gfileutils.h index e6d12f27..939d5459 100644 --- a/glib/gfileutils.h +++ b/glib/gfileutils.h @@ -52,6 +52,7 @@ typedef enum G_FILE_ERROR_INTR, G_FILE_ERROR_IO, G_FILE_ERROR_PERM, + G_FILE_ERROR_NOSYS, G_FILE_ERROR_FAILED } GFileError; -- 2.34.1