Clear libparted kernel re-read messages when scanning devices
When calling commit_to_os() with newer Linux kernels, parted-1.9.0, and at least one partition mounted on the device, the following error message is displayed: The kernel was unable to re-read the partition table on /dev/sda (Device or resource busy). This means Linux won't know anything about the modifications you made until you reboot. You should reboot your computer before doing anything with /dev/sda. If this message is not cleared then it will remain in the libparted_message array and could potentially be displayed along with an error message for a subsequent scanned disk device.
This commit is contained in:
parent
098cb0cddf
commit
1ef489fcd8
|
@ -308,7 +308,12 @@ void GParted_Core::set_devices( std::vector<Device> & devices )
|
|||
set_used_sectors( temp_device .partitions ) ;
|
||||
|
||||
if ( temp_device .highest_busy )
|
||||
{
|
||||
temp_device .readonly = ! commit_to_os( 1 ) ;
|
||||
//Clear libparted messages. Typically these are:
|
||||
// The kernel was unable to re-read the partition table...
|
||||
libparted_messages .clear() ;
|
||||
}
|
||||
}
|
||||
//harddisk without disklabel
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue