Treat reiser4 label "<none>" as meaning blank (#688760)
A reiser4 file system with a blank label is displayed as "<none>" by debugfs.reiser4 and therefore GParted too. # mkfs.reiser4 -y -L "" -f /dev/sda14 # debugfs.reiser4 /dev/sda14 2> /dev/null | grep label: label: <none> Additionally when displaying the Partition Information the following warning is written to the terminal: (gpartedbin:19609): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 23: Element 'markup' was closed, but the currently open element is 'none' Fix by just assuming "<none>" always means blank. If someone really does set the label to "<none>" it won't be displayed. This is equlivant to how btrfs and nilfs2 are already handled. Closes bug 688760 - GParted displays blank resier4 label as <none>
This commit is contained in:
parent
d9ddd2c0f5
commit
f5c153099b
|
@ -96,7 +96,11 @@ void reiser4::read_label( Partition & partition )
|
|||
{
|
||||
if ( ! Utils::execute_command( "debugfs.reiser4 " + partition .get_path(), output, error, true ) )
|
||||
{
|
||||
partition .set_label( Utils::regexp_label( output, "^label:[[:blank:]]*(.*)$" ) ) ;
|
||||
Glib::ustring label = Utils::regexp_label( output, "^label:[[:blank:]]*(.*)$" ) ;
|
||||
if ( label != "<none>" )
|
||||
partition .set_label( label ) ;
|
||||
else
|
||||
partition .set_label( "" ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue