[glib/wip/msanchez/libmount: 3/8] Use libmount to find the path of the fstab file



commit edadb9ba0ebf1ac4c3981682598898927b10220f
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Fri May 20 16:55:08 2016 +0100

    Use libmount to find the path of the fstab file

 gio/gunixmounts.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index 724f0d6..294ad12 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -151,8 +151,8 @@ static guint64 mount_poller_time = 0;
 #ifdef HAVE_MNTENT_H
 #include <mntent.h>
 #ifdef HAVE_LIBMOUNT
-//TODO
-#endif // HAVE_LIBMOUNT
+#include <libmount/libmount.h>
+#endif
 #elif defined (HAVE_SYS_MNTTAB_H)
 #include <sys/mnttab.h>
 #endif
@@ -742,7 +742,13 @@ _g_get_unix_mounts (void)
  */
 
 #ifdef HAVE_LIBMOUNT
-// TODO
+
+static char *
+get_fstab_file (void)
+{
+  return (char *) mnt_get_fstab_path ();
+}
+
 #else
 
 static char *


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