[PATCH V2 2/2] Consolidate display string for optical devices

Samuel Mendoza-Jonas sam.mj at au1.ibm.com
Tue Aug 25 11:50:50 AEST 2015


Instead of using 'Optical' in some places and 'CD/DVD' in others, simply
use 'CD/DVD' for all cases.

Signed-off-by: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
---
 lib/types/types.c    | 2 +-
 ui/ncurses/nc-menu.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/types/types.c b/lib/types/types.c
index 611f2a1..63045e1 100644
--- a/lib/types/types.c
+++ b/lib/types/types.c
@@ -30,7 +30,7 @@ const char *device_type_display_name(enum device_type type)
 	case DEVICE_TYPE_USB:
 		return _("USB");
 	case DEVICE_TYPE_OPTICAL:
-		return _("Optical");
+		return _("CD/DVD");
 	case DEVICE_TYPE_NETWORK:
 		return _("Network");
 	case DEVICE_TYPE_ANY:
diff --git a/ui/ncurses/nc-menu.c b/ui/ncurses/nc-menu.c
index b42dc23..3f09d62 100644
--- a/ui/ncurses/nc-menu.c
+++ b/ui/ncurses/nc-menu.c
@@ -264,8 +264,6 @@ struct pmenu_item *pmenu_find_device(struct pmenu *menu, struct device *dev,
 		}
 		if (matched) {
 			snprintf(buf,sizeof(buf),"[%s: %s / %s]",
-				dev->type == DEVICE_TYPE_OPTICAL ?
-				_("CD/DVD") :
 				device_type_display_name(dev->type),
 				bd->name, bd->uuid);
 		}
-- 
2.5.0



More information about the Petitboot mailing list