Patchwork [21/31] petitboot: Remove nc menu description

login
register
mail settings
Submitter Geoff Levand
Date July 8, 2009, 12:11 a.m.
Message ID <20090708001136.377108490@am.sony.com>
Download mbox | patch
Permalink /patch/29563/
State New
Headers show

Comments

Geoff Levand - July 8, 2009, 12:11 a.m.
Remove some unused nc menu description code.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
 ui/ncurses/nc-cui.c  |   11 ++---------
 ui/ncurses/nc-menu.c |    5 ++---
 ui/ncurses/nc-menu.h |    7 +++----
 ui/ncurses/pb-cui.c  |    3 +--
 ui/ncurses/ps3-cui.c |   35 +++++++++++++++--------------------
 5 files changed, 23 insertions(+), 38 deletions(-)

Patch

--- a/ui/ncurses/nc-cui.c
+++ b/ui/ncurses/nc-cui.c
@@ -289,7 +289,7 @@  void cui_on_open(struct pmenu *menu)
 	i = pmenu_item_alloc(menu);
 
 	name = talloc_asprintf(i, "User item %u:", insert_pt);
-	pmenu_item_setup(menu, i, insert_pt, name, NULL);
+	pmenu_item_setup(menu, i, insert_pt, name);
 
 	i->on_edit = cui_ked_run;
 	i->on_execute = cui_run_kexec;
@@ -351,7 +351,6 @@  static int cui_device_add(struct device 
 		struct pmenu_item *i;
 		struct cui_opt_data *cod;
 		char *name;
-		char *description;
 
 		/* Save the item in opt->ui_info for cui_device_remove() */
 
@@ -360,13 +359,7 @@  static int cui_device_add(struct device 
 		name = talloc_asprintf(i, "%s: %s", opt->name,
 			opt->description);
 
-		description = talloc_asprintf(i,
-			" kexec: image='%s' initrd='%s' args='%s'",
-			opt->boot_image_file,
-			opt->initrd_file,
-			opt->boot_args);
-
-		pmenu_item_setup(cui->main, i, insert_pt, name, description);
+		pmenu_item_setup(cui->main, i, insert_pt, name);
 
 		i->on_edit = cui_ked_run;
 		i->on_execute = cui_run_kexec;
--- a/ui/ncurses/nc-menu.c
+++ b/ui/ncurses/nc-menu.c
@@ -91,8 +91,7 @@  struct pmenu_item *pmenu_item_alloc(stru
 }
 
 struct pmenu_item *pmenu_item_setup(struct pmenu *menu, struct pmenu_item *i,
-	unsigned int index, const char *name,
-	const char *description)
+	unsigned int index, const char *name)
 {
 	assert(i);
 
@@ -101,7 +100,7 @@  struct pmenu_item *pmenu_item_setup(stru
 
 	i->i_sig = pb_item_sig;
 	i->pmenu = menu;
-	i->nci = new_item(name, description);
+	i->nci = new_item(name, NULL);
 
 	if (!i->nci) {
 		talloc_free(i);
--- a/ui/ncurses/nc-menu.h
+++ b/ui/ncurses/nc-menu.h
@@ -45,7 +45,7 @@  struct pmenu_item {
 
 struct pmenu_item *pmenu_item_alloc(struct pmenu *menu);
 struct pmenu_item *pmenu_item_setup(struct pmenu *menu, struct pmenu_item *i,
-	unsigned int index, const char *name, const char *description);
+	unsigned int index, const char *name);
 void pmenu_item_delete(struct pmenu_item *item);
 
 static inline struct pmenu_item *pmenu_item_from_arg(void *arg)
@@ -57,10 +57,9 @@  static inline struct pmenu_item *pmenu_i
 }
 
 static inline struct pmenu_item *pmenu_item_init(struct pmenu *menu,
-	unsigned int index, const char *name, const char *description)
+	unsigned int index, const char *name)
 {
-	return pmenu_item_setup(menu, pmenu_item_alloc(menu), index, name,
-		description);
+	return pmenu_item_setup(menu, pmenu_item_alloc(menu), index, name);
 }
 
 /**
--- a/ui/ncurses/pb-cui.c
+++ b/ui/ncurses/pb-cui.c
@@ -169,8 +169,7 @@  static struct pmenu *pb_mm_init(struct p
 		"ESC=exit, Enter=accept, e=edit, o=open");
 	m->scr.frame.status = talloc_strdup(m, "Welcome to Petitboot");
 
-	i = pmenu_item_init(m, 0, "Exit to Shell",
-		"Exit petitboot and return to a shell prompt");
+	i = pmenu_item_init(m, 0, "Exit to Shell");
 	i->on_execute = pmenu_exit_cb;
 
 	result = pmenu_setup(m);
--- a/ui/ncurses/ps3-cui.c
+++ b/ui/ncurses/ps3-cui.c
@@ -339,17 +339,14 @@  static struct pmenu *ps3_mm_init(struct 
 		"ESC=exit, Enter=accept, e=edit, o=open");
 	m->scr.frame.status = talloc_strdup(m, "Welcome to Petitboot");
 
-	i = pmenu_item_init(m, 0, "Boot GameOS",
-		"Reboot the PS3 into the GameOS");
+	i = pmenu_item_init(m, 0, "Boot GameOS");
 	i->on_execute = cui_run_cmd;
 	i->data = (void *)bgo;
 
-	i = pmenu_item_init(m, 1, "Set Video Mode",
-		"Display a video mode selection menu");
+	i = pmenu_item_init(m, 1, "Set Video Mode");
 	i->on_execute = ps3_mm_to_svm_cb;
 
-	i = pmenu_item_init(m, 2, "Exit to Shell",
-		"Exit petitboot and return to a shell prompt");
+	i = pmenu_item_init(m, 2, "Exit to Shell");
 	i->on_execute = pmenu_exit_cb;
 
 	result = pmenu_setup(m);
@@ -392,53 +389,51 @@  static struct pmenu *ps3_svm_init(struct
 	m->scr.frame.title = talloc_strdup(m, "Select PS3 Video Mode");
 	m->scr.frame.help = talloc_strdup(m, "ESC=exit, Enter=accept");
 
-	i = pmenu_item_init(m, 0, "auto detect",
-		"Auto detect the best HDMI video mode");
+	i = pmenu_item_init(m, 0, "auto detect");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)0;
 
-	i = pmenu_item_init(m, 1, "480i    (576 x 384)", NULL);
+	i = pmenu_item_init(m, 1, "480i    (576 x 384)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)1;
 
-	i = pmenu_item_init(m, 2, "480p    (576 x 384)", NULL);
+	i = pmenu_item_init(m, 2, "480p    (576 x 384)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)2;
 
-	i = pmenu_item_init(m, 3, "576i    (576 x 460)", NULL);
+	i = pmenu_item_init(m, 3, "576i    (576 x 460)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)6;
 
-	i = pmenu_item_init(m, 4, "576p    (576 x 460)", NULL);
+	i = pmenu_item_init(m, 4, "576p    (576 x 460)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)7;
 
-	i = pmenu_item_init(m, 5, "720p   (1124 x 644)", NULL);
+	i = pmenu_item_init(m, 5, "720p   (1124 x 644)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)3;
 
-	i = pmenu_item_init(m, 6, "1080i  (1688 x 964)", NULL);
+	i = pmenu_item_init(m, 6, "1080i  (1688 x 964)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)4;
 
-	i = pmenu_item_init(m, 7, "1080p  (1688 x 964)", NULL);
+	i = pmenu_item_init(m, 7, "1080p  (1688 x 964)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)5;
 
-	i = pmenu_item_init(m, 8, "wxga   (1280 x 768)", NULL);
+	i = pmenu_item_init(m, 8, "wxga   (1280 x 768)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)11;
 
-	i = pmenu_item_init(m, 9, "sxga   (1280 x 1024)", NULL);
+	i = pmenu_item_init(m, 9, "sxga   (1280 x 1024)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)12;
 
-	i = pmenu_item_init(m, 10, "wuxga  (1920 x 1200)", NULL);
+	i = pmenu_item_init(m, 10, "wuxga  (1920 x 1200)");
 	i->on_execute = ps3_svm_cb;
 	i->data = (void *)13;
 
-	i = pmenu_item_init(m, 11, "Return",
-		"Return to the main menu");
+	i = pmenu_item_init(m, 11, "Return");
 	i->on_execute = ps3_svm_to_mm_cb;
 
 	result = pmenu_setup(m);