glib r7782 - trunk/gio



Author: matthiasc
Date: Thu Jan  8 01:32:15 2009
New Revision: 7782
URL: http://svn.gnome.org/viewvc/glib?rev=7782&view=rev

Log:
        * gioenums.h: Add a G_IO_ERROR_TOO_MANY_OPEN_FILES error code.
        Requested by Olivier Sessink.

        * gioerror.c: Translate EMFILE to G_IO_ERROR_TOO_MANY_OPEN_FILES.

        * glocalfileenumerator.c: Translate G_FILE_ERROR_MFILE to
        G_IO_ERROR_TOO_MANY_OPEN_FILES.



Modified:
   trunk/gio/ChangeLog
   trunk/gio/gdesktopappinfo.c
   trunk/gio/gioenums.h
   trunk/gio/gioerror.c
   trunk/gio/glocalfileenumerator.c

Modified: trunk/gio/gdesktopappinfo.c
==============================================================================
--- trunk/gio/gdesktopappinfo.c	(original)
+++ trunk/gio/gdesktopappinfo.c	Thu Jan  8 01:32:15 2009
@@ -53,9 +53,9 @@
  * #GDesktopAppInfo is an implementation of #GAppInfo based on
  * desktop files.
  * 
- * Note that GDesktopAppInfo belongs to the UNIX-specific GIO interfaces,
- * thus you have to use the <filename>gio-unix-2.0.pc</filename> pkg-config
- * file when using it.
+ * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to 
+ * the UNIX-specific GIO interfaces, thus you have to use the 
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
  */
 
 #define DEFAULT_APPLICATIONS_GROUP  "Default Applications" 

Modified: trunk/gio/gioenums.h
==============================================================================
--- trunk/gio/gioenums.h	(original)
+++ trunk/gio/gioenums.h	Thu Jan  8 01:32:15 2009
@@ -328,7 +328,11 @@
  * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
  * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
  * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
- * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
+ * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has 
+ *     already interacted with the user. Do not display any error dialog.
+ * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files 
+ *     open and can't open any more. Duplicate descriptors do count toward 
+ *     this limit. Since 2.20
  *
  * Error codes returned by GIO functions.
  *
@@ -364,7 +368,8 @@
   G_IO_ERROR_WOULD_BLOCK,
   G_IO_ERROR_HOST_NOT_FOUND,
   G_IO_ERROR_WOULD_MERGE,
-  G_IO_ERROR_FAILED_HANDLED
+  G_IO_ERROR_FAILED_HANDLED,
+  G_IO_ERROR_TOO_MANY_OPEN_FILES
 } GIOErrorEnum;
 
 

Modified: trunk/gio/gioerror.c
==============================================================================
--- trunk/gio/gioerror.c	(original)
+++ trunk/gio/gioerror.c	Thu Jan  8 01:32:15 2009
@@ -167,7 +167,13 @@
       return G_IO_ERROR_WOULD_BLOCK;
       break;
 #endif
-      
+
+#ifdef EMFILE
+    case EMFILE:
+      return G_IO_ERROR_TOO_MANY_OPEN_FILES;
+      break;
+#endif
+
     default:
       return G_IO_ERROR_FAILED;
       break;

Modified: trunk/gio/glocalfileenumerator.c
==============================================================================
--- trunk/gio/glocalfileenumerator.c	(original)
+++ trunk/gio/glocalfileenumerator.c	Thu Jan  8 01:32:15 2009
@@ -176,6 +176,9 @@
         case G_FILE_ERROR_NOTDIR:
           new_code = G_IO_ERROR_NOT_DIRECTORY;
           break;
+        case G_FILE_ERROR_MFILE:
+          new_code = G_IO_ERROR_TOO_MANY_OPEN_FILES;
+          break;
         default:
           break;
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]