[gnome-disk-utility] Log to stderr if we can't connect to the udisks daemon



commit 6a8490c33e5e26ed2415a47dc2463f0b9fa9869d
Author: David Zeuthen <davidz redhat com>
Date:   Thu Dec 17 14:01:08 2009 -0500

    Log to stderr if we can't connect to the udisks daemon
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 src/gdu/gdu-pool.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/gdu/gdu-pool.c b/src/gdu/gdu-pool.c
index a6056db..fb8e858 100644
--- a/src/gdu/gdu-pool.c
+++ b/src/gdu/gdu-pool.c
@@ -1725,8 +1725,12 @@ gdu_pool_new (void)
         error = NULL;
         pool = gdu_pool_new_for_address (NULL, NULL, &error);
         if (pool == NULL) {
-                g_printerr ("Error constructing pool: %s\n", error->message);
-                g_error_free (error);
+                g_printerr ("======================================================================\n"
+                            "Error constructing GduPool: %s\n"
+                            "\n"
+                            "This error suggests there's a problem with your udisks or D-Bus installation.\n"
+                            "======================================================================\n",
+                            error->message);
         }
 
         return pool;
@@ -1980,6 +1984,12 @@ gdu_pool_new_for_address (const gchar     *ssh_user_name,
 
 error:
         g_object_unref (pool);
+        if (error != NULL && *error == NULL) {
+                g_set_error (error,
+                             GDU_ERROR,
+                             GDU_ERROR_FAILED,
+                             "(unspecified error)");
+        }
         return NULL;
 }
 



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