[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 4/5] Display drive model and size in MB in partitioning UI (#460697)
- From: David Cantrell <dcantrell redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 4/5] Display drive model and size in MB in partitioning UI (#460697)
- Date: Thu, 2 Jul 2009 20:39:31 -1000
When a partition table is unreadable, anaconda displays a
window explaining the situation and asks you if you would
like to format the disk for use. The existing message would
only give the device node name (e.g., /dev/sda47). This
patch adds the drive model name and capacity to the message
so confused users might know which disk anaconda is talking
about.
---
storage/devicetree.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 08846f3..c199212 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -126,10 +126,18 @@ def questionInitializeDisk(intf=None, name=None):
if not intf or not name:
pass
else:
+ if not name.startswith('/dev/'):
+ devpath = '/dev/' + name
+ else:
+ devpath = name
+
+ dev = parted.getDevice(devpath)
+
rc = intf.messageWindow(_("Warning"),
- _("Error processing drive %s.\n"
+ _("Error processing drive %s (%s %-0.fMB).\n\n"
"Maybe it needs to be reinitialized. "
- "YOU WILL LOSE ALL DATA ON THIS DRIVE!") % (name,),
+ "YOU WILL LOSE ALL DATA ON THIS DRIVE!")
+ % (name, dev.model, dev.getSize(),),
type="custom",
custom_buttons = [ _("_Ignore drive"),
_("_Re-initialize drive") ],
--
1.6.3.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]