[glib] gio-tool: Return error if there are not any volumes to mount



commit 094613425ee949def2bcac83dcda3eee8b6856df
Author: Ondrej Holy <oholy redhat com>
Date:   Fri Dec 16 14:43:57 2016 +0100

    gio-tool: Return error if there are not any volumes to mount
    
    Print error and return error code if device doesn't contain any
    volumes to mount.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776169

 gio/gio-tool-mount.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gio-tool-mount.c b/gio/gio-tool-mount.c
index 6f5cbb8..eb9c964 100644
--- a/gio/gio-tool-mount.c
+++ b/gio/gio-tool-mount.c
@@ -946,8 +946,8 @@ mount_with_device_file (const char *device_file)
 
   if (outstanding_mounts == 0)
     {
-      g_print ("%s: %s\n", device_file, _("No volume for device file"));
-      return;
+      print_error ("%s: %s", device_file, _("No volume for device file"));
+      success = FALSE;
     }
 
   g_object_unref (volume_monitor);


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