Display correct type of mdadm recognised ATARAID members (#75)
The previous commit, made mdadm recognised IMSM and DDF type ATARAID members get displayed as "linux-raid" (Linux Software RAID array member). This was because of query method 1 in detect_filesystems(). Fix this now by exposing and using the fstype of the member from the SWRaid_Info cache. Closes #75 - Errors with GPT on RAID 0 ATARAID array
This commit is contained in:
parent
73bf8bef62
commit
ef6794b7de
|
@ -58,6 +58,7 @@ public:
|
||||||
static void load_cache();
|
static void load_cache();
|
||||||
static bool is_member( const Glib::ustring & member_path );
|
static bool is_member( const Glib::ustring & member_path );
|
||||||
static bool is_member_active( const Glib::ustring & member_path );
|
static bool is_member_active( const Glib::ustring & member_path );
|
||||||
|
static FSType get_fstype(const Glib::ustring& member_path);
|
||||||
static Glib::ustring get_array( const Glib::ustring & member_path );
|
static Glib::ustring get_array( const Glib::ustring & member_path );
|
||||||
static Glib::ustring get_uuid( const Glib::ustring & member_path );
|
static Glib::ustring get_uuid( const Glib::ustring & member_path );
|
||||||
static Glib::ustring get_label( const Glib::ustring & member_path );
|
static Glib::ustring get_label( const Glib::ustring & member_path );
|
||||||
|
|
|
@ -1202,9 +1202,9 @@ FSType GParted_Core::detect_filesystem( PedDevice * lp_device, PedPartition * lp
|
||||||
// (Q4) internal
|
// (Q4) internal
|
||||||
path = lp_device->path;
|
path = lp_device->path;
|
||||||
|
|
||||||
// (Q1) Linux Software RAID member detection
|
// (Q1) SWRaid_Info (mdadm) member detection.
|
||||||
if ( SWRaid_Info::is_member( path ) )
|
if ( SWRaid_Info::is_member( path ) )
|
||||||
return FS_LINUX_SWRAID;
|
return SWRaid_Info::get_fstype(path);
|
||||||
|
|
||||||
// (Q2) FS_Info (blkid) file system detection
|
// (Q2) FS_Info (blkid) file system detection
|
||||||
// Blkid detects more signatures and generally has less limitations so use before
|
// Blkid detects more signatures and generally has less limitations so use before
|
||||||
|
|
|
@ -74,6 +74,16 @@ bool SWRaid_Info::is_member_active( const Glib::ustring & member_path )
|
||||||
return memb.active;
|
return memb.active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Return "file system" type of the member, or FS_UNKNOWN if there is no such member.
|
||||||
|
FSType SWRaid_Info::get_fstype(const Glib::ustring& member_path)
|
||||||
|
{
|
||||||
|
initialise_if_required();
|
||||||
|
const SWRaid_Member& memb = get_cache_entry_by_member(member_path);
|
||||||
|
return memb.fstype;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return array /dev entry (e.g. "/dev/md1") containing the specified member, or "" if the
|
// Return array /dev entry (e.g. "/dev/md1") containing the specified member, or "" if the
|
||||||
// array is not running or there is no such member.
|
// array is not running or there is no such member.
|
||||||
Glib::ustring SWRaid_Info::get_array( const Glib::ustring & member_path )
|
Glib::ustring SWRaid_Info::get_array( const Glib::ustring & member_path )
|
||||||
|
|
Loading…
Reference in New Issue