mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
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
This commit is contained in:
parent
f535218f70
commit
ae38d2bfa4
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user