[glib] gunixmounts: move GUnixMountMonitor code



commit ae38d2bfa4e0bd72bf418a42cd5bda7a156b6092
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Jan 7 23:52:53 2015 -0500

    gunixmounts: move GUnixMountMonitor code
    
    Move this code to the correct part of the file.
    
    While we're at it, drop an unused #define MOUNT_POLL_INTERVAL.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742599

 gio/gunixmounts.c |   56 +++++++++++++++++++++++++---------------------------
 1 files changed, 27 insertions(+), 29 deletions(-)
---
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index 08f61d1..4e4f794 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -138,40 +138,11 @@ struct _GUnixMountPoint {
   gboolean is_loopback;
 };
 
-enum {
-  MOUNTS_CHANGED,
-  MOUNTPOINTS_CHANGED,
-  LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL];
-
-struct _GUnixMountMonitor {
-  GObject parent;
-
-  GFileMonitor *fstab_monitor;
-  GFileMonitor *mtab_monitor;
-
-  GList *mount_poller_mounts;
-
-  GSource *proc_mounts_watch_source;
-};
-
-struct _GUnixMountMonitorClass {
-  GObjectClass parent_class;
-};
-  
-static GUnixMountMonitor *the_mount_monitor = NULL;
-
 static GList *_g_get_unix_mounts (void);
 static GList *_g_get_unix_mount_points (void);
 
 static guint64 mount_poller_time = 0;
 
-G_DEFINE_TYPE (GUnixMountMonitor, g_unix_mount_monitor, G_TYPE_OBJECT);
-
-#define MOUNT_POLL_INTERVAL 4000
-
 #ifdef HAVE_SYS_MNTTAB_H
 #define MNTOPT_RO      "ro"
 #endif
@@ -1292,6 +1263,33 @@ g_unix_mount_points_changed_since (guint64 time)
 
 /* GUnixMountMonitor {{{1 */
 
+enum {
+  MOUNTS_CHANGED,
+  MOUNTPOINTS_CHANGED,
+  LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+struct _GUnixMountMonitor {
+  GObject parent;
+
+  GFileMonitor *fstab_monitor;
+  GFileMonitor *mtab_monitor;
+
+  GList *mount_poller_mounts;
+
+  GSource *proc_mounts_watch_source;
+};
+
+struct _GUnixMountMonitorClass {
+  GObjectClass parent_class;
+};
+
+static GUnixMountMonitor *the_mount_monitor = NULL;
+
+G_DEFINE_TYPE (GUnixMountMonitor, g_unix_mount_monitor, G_TYPE_OBJECT);
+
 static void
 g_unix_mount_monitor_finalize (GObject *object)
 {


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