[gnome-disk-utility] Turn some warnings that are not fatal into debug messages



commit 83189e488cb9da8894eb3e53774102ba795e6492
Author: David Zeuthen <davidz redhat com>
Date:   Mon Nov 2 14:18:45 2009 -0500

    Turn some warnings that are not fatal into debug messages
    
    Specifically, DKD 009 adds a new property so we want to avoid things
    like
    
    (lt-palimpsest:19998): libgdu-WARNING **: unhandled property 'LinuxMdComponentPosition'

 src/gdu/gdu-device.c |    4 ++--
 src/gdu/gdu-pool.c   |    7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/gdu/gdu-device.c b/src/gdu/gdu-device.c
index 184f424..b66fa25 100644
--- a/src/gdu/gdu-device.c
+++ b/src/gdu/gdu-device.c
@@ -390,7 +390,7 @@ collect_props (const char *key, const GValue *value, DeviceProperties *props)
                 handled = FALSE;
 
         if (!handled)
-                g_warning ("unhandled property '%s'", key);
+                g_debug ("unhandled property '%s'", key);
 }
 
 static void
@@ -473,7 +473,7 @@ device_properties_get (DBusGConnection *bus,
                                 dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
                                 &hash_table,
                                 G_TYPE_INVALID)) {
-                g_warning ("Couldn't call GetAll() to get properties for %s: %s", object_path, error->message);
+                g_debug ("Error calling GetAll() when retrieving properties for %s: %s", object_path, error->message);
                 g_error_free (error);
 
                 device_properties_free (props);
diff --git a/src/gdu/gdu-pool.c b/src/gdu/gdu-pool.c
index 0258e6e..843c33b 100644
--- a/src/gdu/gdu-pool.c
+++ b/src/gdu/gdu-pool.c
@@ -917,7 +917,10 @@ device_removed_signal_handler (DBusGProxy *proxy, const char *object_path, gpoin
 
         device = gdu_pool_get_by_object_path (pool, object_path);
         if (device == NULL) {
-                g_warning ("No device to remove for remove %s", object_path);
+                /* This is not fatal - the device may have been removed when GetAll() failed
+                 * when getting properties
+                 */
+                g_debug ("No device to remove for remove %s", object_path);
                 goto out;
         }
 
@@ -1014,7 +1017,7 @@ get_properties (GduPool *pool)
                                 dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
                                 &hash_table,
                                 G_TYPE_INVALID)) {
-                g_warning ("Couldn't call GetAll() to get properties for /: %s", error->message);
+                g_debug ("Error calling GetAll() when retrieving properties for /: %s", error->message);
                 g_error_free (error);
                 goto out;
         }



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