From cdf5d74201a50423a4535673495a38150dc74cb8 Mon Sep 17 00:00:00 2001 From: fling Date: Mon, 11 Oct 2010 16:43:26 +0800 Subject: [PATCH] modified: ri_tk_cmd.py if a hard disk be made of a raid,the hard disk don't display on mountpoint display frame.Node don't modified Mount's data --- interface/ri_tk_cmd.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/interface/ri_tk_cmd.py b/interface/ri_tk_cmd.py index 0920b20..dcdfbd0 100644 --- a/interface/ri_tk_cmd.py +++ b/interface/ri_tk_cmd.py @@ -18,10 +18,16 @@ def serial_no_quit(): def mount_list_init(w=''): ''' initialize mount list ''' - ri_data.MountPoint.init_from_internal() + dev_in_raid = set() l = [] + for r in ri_data.Raid.list: + dev_in_raid.update(r.active_components) + dev_in_raid.update(r.spare_components) + ri_data.MountPoint.init_from_internal() for m in ri_data.MountPoint.list: # get size from Partition info + if m.device in dev_in_raid: + continue sz = ri_data.Partition.get_size(m.device) if not sz: sz = ri_data.Raid.get_size(m.device)