[libgsystem] gs_file_read_noatime: Fix various errors



commit c4068eaa793212eb7caad6e0ff2fb35e4aab184a
Author: Colin Walters <walters verbum org>
Date:   Wed Aug 15 13:39:21 2012 -0400

    gs_file_read_noatime: Fix various errors

 gsystem-file-utils.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c
index 71902a1..dbc5bc8 100644
--- a/gsystem-file-utils.c
+++ b/gsystem-file-utils.c
@@ -21,7 +21,10 @@
 
 #include "config.h"
 
-#include "gsystem-file-utils.h"
+#include "libgsystem.h"
+#include <glib/gstdio.h>
+#include <gio/gunixinputstream.h>
+#include <glib-unix.h>
  
 static int
 _open_fd_noatime (const char *path)
@@ -67,10 +70,11 @@ gs_file_read_noatime (GFile         *file,
   if (path == NULL)
     return NULL;
 
-  fd = _open_fd (path);
+  fd = _open_fd_noatime (path);
   if (fd < 0)
     {
-      g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno));
+      g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
+                   "%s", g_strerror (errno));
       return NULL;
     }
 



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