[gnome-settings-daemon] housekeeping: Ignore the Retrode's low-space



commit 940ddef8b4acd48c64835faabf58d146b21ed910
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Aug 23 01:37:25 2017 +0200

    housekeeping: Ignore the Retrode's low-space
    
    It doesn't have any space left on its "hard drive", just enough to
    be able to save the configuration file, and store the cartridge's ROM.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786657

 plugins/housekeeping/gsd-disk-space-helper.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/plugins/housekeeping/gsd-disk-space-helper.c b/plugins/housekeeping/gsd-disk-space-helper.c
index ff1b227..c256f98 100644
--- a/plugins/housekeeping/gsd-disk-space-helper.c
+++ b/plugins/housekeeping/gsd-disk-space-helper.c
@@ -33,6 +33,7 @@ gboolean
 gsd_should_ignore_unix_mount (GUnixMountEntry *mount)
 {
         const char *fs, *device;
+        g_autofree char *label = NULL;
         guint i;
 
         /* This is borrowed from GLib and used as a way to determine
@@ -90,18 +91,26 @@ gsd_should_ignore_unix_mount (GUnixMountEntry *mount)
                 "/dev/vn",
                 NULL
         };
+        const gchar *ignore_labels[] = {
+                "RETRODE",
+                NULL
+        };
 
         fs = g_unix_mount_get_fs_type (mount);
-        device = g_unix_mount_get_device_path (mount);
-
         for (i = 0; ignore_fs[i] != NULL; i++)
                 if (g_str_equal (ignore_fs[i], fs))
                         return TRUE;
 
+        device = g_unix_mount_get_device_path (mount);
         for (i = 0; ignore_devices[i] != NULL; i++)
                 if (g_str_equal (ignore_devices[i], device))
                         return TRUE;
 
+        label = g_unix_mount_guess_name (mount);
+        for (i = 0; ignore_labels[i] != NULL; i++)
+                if (g_str_equal (ignore_labels[i], label))
+                        return TRUE;
+
         return FALSE;
 }
 


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