gvfs r2247 - in trunk: . client daemon daemon/trashlib test



Author: pborelli
Date: Tue Feb 24 11:25:46 2009
New Revision: 2247
URL: http://svn.gnome.org/viewvc/gvfs?rev=2247&view=rev

Log:
2009-02-24  Paolo Borelli  <pborelli katamail com>

	* test/benchmark-posix-small-files.c:
	* test/benchmark-posix-big-files.c:
	* daemon/trashlib/dirwatch.c:
	* daemon/gvfsbackendsmbbrowse.c:
	* client/gvfsfusedaemon.c:
	Always use g_strerror



Modified:
   trunk/ChangeLog
   trunk/client/gvfsfusedaemon.c
   trunk/daemon/gvfsbackendsmbbrowse.c
   trunk/daemon/trashlib/   (props changed)
   trunk/daemon/trashlib/dirwatch.c
   trunk/test/benchmark-posix-big-files.c
   trunk/test/benchmark-posix-small-files.c

Modified: trunk/client/gvfsfusedaemon.c
==============================================================================
--- trunk/client/gvfsfusedaemon.c	(original)
+++ trunk/client/gvfsfusedaemon.c	Tue Feb 24 11:25:46 2009
@@ -666,7 +666,7 @@
       g_object_unref (file);
     }
 
-  debug_print ("vfs_statfs: -> %s\n", strerror (-result));
+  debug_print ("vfs_statfs: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -694,7 +694,7 @@
   stbuf->f_flag = 0;  /* Ignored by FUSE */
   stbuf->f_namemax = 1024;
 
-  debug_print ("vfs_statfs: -> %s\n", strerror (-result));
+  debug_print ("vfs_statfs: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -859,7 +859,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_getattr: -> %s\n", strerror (-result));
+  debug_print ("vfs_getattr: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1037,7 +1037,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_open: -> %s\n", strerror (-result));
+  debug_print ("vfs_open: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1107,7 +1107,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_create: -> %s\n", strerror (-result));
+  debug_print ("vfs_create: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1274,7 +1274,7 @@
     }
 
   if (result < 0)
-    debug_print ("vfs_read: -> %s\n", strerror (-result));
+    debug_print ("vfs_read: -> %s\n", g_strerror (-result));
   else
     debug_print ("vfs_read: -> %d bytes read.\n", result);
 
@@ -1397,7 +1397,7 @@
     }
 
   if (result < 0)
-    debug_print ("vfs_write: -> %s\n", strerror (-result));
+    debug_print ("vfs_write: -> %s\n", g_strerror (-result));
   else
     debug_print ("vfs_write: -> %d bytes written.\n", result);
 
@@ -1591,7 +1591,7 @@
   if (new_file)
     g_object_unref (new_file);
 
-  debug_print ("vfs_rename: -> %s\n", strerror (-result));
+  debug_print ("vfs_rename: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1640,7 +1640,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_unlink: -> %s\n", strerror (-result));
+  debug_print ("vfs_unlink: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1678,7 +1678,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_mkdir: -> %s\n", strerror (-result));
+  debug_print ("vfs_mkdir: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1734,7 +1734,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_rmdir: -> %s\n", strerror (-result));
+  debug_print ("vfs_rmdir: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1801,7 +1801,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_ftruncate: -> %s\n", strerror (-result));
+  debug_print ("vfs_ftruncate: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1863,7 +1863,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_truncate: -> %s\n", strerror (-result));
+  debug_print ("vfs_truncate: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1894,7 +1894,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_symlink: -> %s\n", strerror (-result));
+  debug_print ("vfs_symlink: -> %s\n", g_strerror (-result));
 
   return result;
 }
@@ -1952,7 +1952,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_access: -> %s\n", strerror (-result));
+  debug_print ("vfs_access: -> %s\n", g_strerror (-result));
   return result;
 }
 
@@ -2014,7 +2014,7 @@
       result = -ENOENT;
     }
 
-  debug_print ("vfs_utimens: -> %s\n", strerror (-result));
+  debug_print ("vfs_utimens: -> %s\n", g_strerror (-result));
   return result;
 }
 

Modified: trunk/daemon/gvfsbackendsmbbrowse.c
==============================================================================
--- trunk/daemon/gvfsbackendsmbbrowse.c	(original)
+++ trunk/daemon/gvfsbackendsmbbrowse.c	Tue Feb 24 11:25:46 2009
@@ -614,7 +614,7 @@
         {
           if (res < 0)
             DEBUG ("update_cache - smbc_getdents returned %d, errno = [%d] %s\n", 
-                   res, errno, strerror (errno));
+                   res, errno, g_strerror (errno));
 	  break;
 	}  
       
@@ -937,7 +937,7 @@
 
       DEBUG ("do_mount - [%s; %d] dir = %p, cancelled = %d, errno = [%d] '%s' \n", 
              uri->str, op_backend->mount_try, dir, op_backend->mount_cancelled, 
-             errno, strerror (errno));
+             errno, g_strerror (errno));
 
       if (dir == NULL && 
           (op_backend->mount_cancelled || (errno != EPERM && errno != EACCES)))

Modified: trunk/daemon/trashlib/dirwatch.c
==============================================================================
--- trunk/daemon/trashlib/dirwatch.c	(original)
+++ trunk/daemon/trashlib/dirwatch.c	Tue Feb 24 11:25:46 2009
@@ -86,7 +86,6 @@
 
 #ifdef DIR_WATCH_DEBUG
 #include <errno.h>
-#include <string.h>
 #endif
 
 static gboolean
@@ -104,8 +103,9 @@
 
 #ifdef DIR_WATCH_DEBUG
   g_print ("    lstat ('%s') -> is%s a directory (%s)\n",
-           path, result ? "" : " not", strerror (errno));
+           path, result ? "" : " not", g_strerror (errno));
 #endif
+
   g_free (path);
 
   return result;

Modified: trunk/test/benchmark-posix-big-files.c
==============================================================================
--- trunk/test/benchmark-posix-big-files.c	(original)
+++ trunk/test/benchmark-posix-big-files.c	Tue Feb 24 11:25:46 2009
@@ -72,7 +72,7 @@
   output_fd = open (scratch_file, O_WRONLY | O_CREAT | O_TRUNC, 0777);
   if (output_fd < 0)
     {
-      g_printerr ("Failed to create scratch file: %s\n", strerror (errno));
+      g_printerr ("Failed to create scratch file: %s\n", g_strerror (errno));
       g_free (scratch_file);
       return NULL;
     }
@@ -92,7 +92,7 @@
               continue;
             }
 
-          g_printerr ("Failed to populate scratch file: %s\n", strerror (errno));
+          g_printerr ("Failed to populate scratch file: %s\n", g_strerror (errno));
           close (output_fd);
           g_free (scratch_file);
           return NULL;
@@ -112,7 +112,7 @@
   input_fd = open (scratch_file, O_RDONLY);
   if (input_fd < 0)
     {
-      g_printerr ("Failed to read back scratch file: %s\n", strerror (errno));
+      g_printerr ("Failed to read back scratch file: %s\n", g_strerror (errno));
       return;
     }
 
@@ -130,7 +130,7 @@
               continue;
             }
 
-          g_printerr ("Failed to read back scratch file: %s\n", strerror (errno));
+          g_printerr ("Failed to read back scratch file: %s\n", g_strerror (errno));
           close (input_fd);
           return;
         }
@@ -144,7 +144,7 @@
 {
   if (unlink (scratch_file) < 0)
     {
-      g_printerr ("Failed to delete scratch file: %s\n", strerror (errno));
+      g_printerr ("Failed to delete scratch file: %s\n", g_strerror (errno));
     }
 }
 

Modified: trunk/test/benchmark-posix-small-files.c
==============================================================================
--- trunk/test/benchmark-posix-small-files.c	(original)
+++ trunk/test/benchmark-posix-small-files.c	Tue Feb 24 11:25:46 2009
@@ -72,7 +72,7 @@
   output_fd = open (scratch_file, O_WRONLY | O_CREAT | O_TRUNC, 0777);
   if (output_fd < 0)
     {
-      g_printerr ("Failed to create scratch file: %s\n", strerror (errno));
+      g_printerr ("Failed to create scratch file: %s\n", g_strerror (errno));
       g_free (scratch_file);
       return NULL;
     }
@@ -92,7 +92,7 @@
               continue;
             }
 
-          g_printerr ("Failed to populate scratch file: %s\n", strerror (errno));
+          g_printerr ("Failed to populate scratch file: %s\n", g_strerror (errno));
           close (output_fd);
           g_free (scratch_file);
           return NULL;
@@ -112,7 +112,7 @@
   input_fd = open (scratch_file, O_RDONLY);
   if (input_fd < 0)
     {
-      g_printerr ("Failed to read back scratch file: %s\n", strerror (errno));
+      g_printerr ("Failed to read back scratch file: %s\n", g_strerror (errno));
       return;
     }
 
@@ -130,7 +130,7 @@
               continue;
             }
 
-          g_printerr ("Failed to read back scratch file: %s\n", strerror (errno));
+          g_printerr ("Failed to read back scratch file: %s\n", g_strerror (errno));
           close (input_fd);
           return;
         }
@@ -144,7 +144,7 @@
 {
   if (unlink (scratch_file) < 0)
     {
-      g_printerr ("Failed to delete scratch file: %s\n", strerror (errno));
+      g_printerr ("Failed to delete scratch file: %s\n", g_strerror (errno));
     }
 }
 



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