[gparted] Improve reiser4 file system uuid reading method
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Improve reiser4 file system uuid reading method
- Date: Thu, 15 Mar 2012 16:38:30 +0000 (UTC)
commit 2919057abd1e5870c5f974c0a3344ff790503723
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Tue Mar 13 01:12:37 2012 +0000
Improve reiser4 file system uuid reading method
Previously used "fsck.reiser4" to perform a file system check with a by
product of outputting the uuid. However this performs a lot of disk I/O
and takes a while to complete. Instead use the much faster and less
resource intensive "debugfs.reiser4" tool to retrieve the uuid.
src/reiser4.cc | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/reiser4.cc b/src/reiser4.cc
index 859b8f3..b5650b6 100644
--- a/src/reiser4.cc
+++ b/src/reiser4.cc
@@ -28,7 +28,10 @@ FS reiser4::get_filesystem_support()
fs .filesystem = GParted::FS_REISER4 ;
if ( ! Glib::find_program_in_path( "debugfs.reiser4" ) .empty() )
+ {
fs .read = GParted::FS::EXTERNAL ;
+ fs .read_uuid = GParted::FS::EXTERNAL ;
+ }
if ( ! Glib::find_program_in_path( "vol_id" ) .empty() )
fs .read_label = FS::EXTERNAL ;
@@ -37,11 +40,7 @@ FS reiser4::get_filesystem_support()
fs .create = GParted::FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "fsck.reiser4" ) .empty() )
- {
- fs .read_uuid = GParted::FS::EXTERNAL ;
fs .check = GParted::FS::EXTERNAL ;
- }
-
if ( fs .check )
{
@@ -107,9 +106,9 @@ bool reiser4::write_label( const Partition & partition, OperationDetail & operat
void reiser4::read_uuid( Partition & partition )
{
- if ( ! Utils::execute_command( "fsck.reiser4 --check --yes " + partition .get_path(), output, error, true ) )
+ if ( ! Utils::execute_command( "debugfs.reiser4 " + partition .get_path(), output, error, true ) )
{
- partition .uuid = Utils::regexp_label( error, "uuid:[[:blank:]]*([^[:space:]]*)" ) ;
+ partition .uuid = Utils::regexp_label( output, "uuid:[[:blank:]]*([^[:space:]]*)" ) ;
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]