[gparted] Include failing mount command in the error dialog (#742741)



commit 30086b2e80b601987193d2bea68029c4b5e02dc4
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Jan 10 16:00:11 2015 +0000

    Include failing mount command in the error dialog (#742741)
    
    On RHEL/CentOS 6 GParted fails to mount nilfs2 file system.  Include the
    failing file system mount command in the error dialog so the user knows
    what command failed.  The error dialog now looks like:
    
        (-) Could not mount /dev/sdc1 on /mnt/1
    
            # mount -v /dev/sdc1 "/mnt/1"
            mount: you must specify the filesystem type
    
                                               [  OK  ]
    
    Also stop telling the dialog that the secondary text contains pango
    markup as the command line and error message certainly isn't pango
    markup text.
    
    Bug 742741 - Nilfs2 file system is unusable on RHEL/CentOS 6

 src/Win_GParted.cc |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index dffb10a..cc77ba1 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -2281,16 +2281,16 @@ void Win_GParted::activate_mount_partition( unsigned int index )
        }
 
        bool success = false ;
-       Glib::ustring error ;
-       Glib::ustring stdout;
+       Glib::ustring cmd;
+       Glib::ustring output;
+       Glib::ustring error;
 
        show_pulsebar( String::ucompose( _("mounting %1 on %2"),
                                         selected_partition .get_path(),
                                         selected_partition .get_mountpoints()[ index ] ) ) ;
-       success = !Utils::execute_command( "mount -v " + selected_partition .get_path() + " \"" +
-                                          selected_partition.get_mountpoints()[ index ] + "\"",
-                                          stdout,
-                                          error ) ;
+       cmd = "mount -v " + selected_partition.get_path() +
+             " \"" + selected_partition.get_mountpoints()[index] + "\"";
+       success = ! Utils::execute_command( cmd, output, error );
        hide_pulsebar();
        if ( ! success )
        {
@@ -2303,8 +2303,8 @@ void Win_GParted::activate_mount_partition( unsigned int index )
                                           Gtk::BUTTONS_OK,
                                           true );
 
-               dialog .set_secondary_text( error, true ) ;
-       
+               dialog.set_secondary_text( "# " + cmd + "\n" + error );
+
                dialog.run() ;
        }
 


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