[gnome-disk-utility/new-ui] The number in "Number of Ports" for SAS HBAs really is number of PHYs
- From: David Zeuthen <davidz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/new-ui] The number in "Number of Ports" for SAS HBAs really is number of PHYs
- Date: Sun, 29 Nov 2009 18:48:36 +0000 (UTC)
commit 180491be5098a821b0e4e795fadb4a9dcc2ab36a
Author: David Zeuthen <davidz redhat com>
Date: Sun Nov 29 13:47:52 2009 -0500
The number in "Number of Ports" for SAS HBAs really is number of PHYs
src/palimpsest/gdu-section-hba.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/palimpsest/gdu-section-hba.c b/src/palimpsest/gdu-section-hba.c
index 7516dcb..f60affa 100644
--- a/src/palimpsest/gdu-section-hba.c
+++ b/src/palimpsest/gdu-section-hba.c
@@ -84,13 +84,8 @@ gdu_section_hba_update (GduSection *_section)
fabric = gdu_adapter_get_fabric (a);
num_ports = gdu_adapter_get_num_ports (a);
- if (num_ports > 0) {
- num_ports_str = g_strdup_printf ("%d", num_ports);
- } else {
- num_ports_str = g_strdup ("â??");
- }
+ /* TODO: maybe move these blocks of code to gdu-util.c as util functions */
- /* TODO: maybe move to gdu-util.c */
if (g_str_has_prefix (fabric, "ata_pata")) {
fabric_str = g_strdup ("Parallel ATA");
} else if (g_str_has_prefix (fabric, "ata_sata")) {
@@ -105,6 +100,19 @@ gdu_section_hba_update (GduSection *_section)
fabric_str = g_strdup ("â??");
}
+ if (num_ports > 0) {
+ if (g_strcmp0 (fabric, "scsi_sas") == 0) {
+ /* Translators: Used for SAS to convey the number of PHYs in the
+ * "Number of Ports" element. You should probably not translate PHY.
+ */
+ num_ports_str = g_strdup_printf (_("%d PHYs"), num_ports);
+ } else {
+ num_ports_str = g_strdup_printf ("%d", num_ports);
+ }
+ } else {
+ num_ports_str = g_strdup ("â??");
+ }
+
gdu_details_element_set_text (section->priv->vendor_element, vendor);
gdu_details_element_set_text (section->priv->model_element, model);
gdu_details_element_set_text (section->priv->driver_element, driver);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]