From patchwork Wed Jul 8 00:11:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 29563 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id DF82FB7088 for ; Wed, 8 Jul 2009 10:22:57 +1000 (EST) Received: by ozlabs.org (Postfix) id 34DE7DE5A8; Wed, 8 Jul 2009 10:20:41 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 33223DE151 for ; Wed, 8 Jul 2009 10:20:41 +1000 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from hera.kernel.org (hera.kernel.org [140.211.167.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F2C6FDDE0D; Wed, 8 Jul 2009 10:18:22 +1000 (EST) Received: from hera.kernel.org (IDENT:U2FsdGVkX1+iPHS6Z0HEhXa4xQMDhJkJeglXh7U8Li4@localhost [127.0.0.1]) by hera.kernel.org (8.14.2/8.14.2) with ESMTP id n680IIns026673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Jul 2009 00:18:18 GMT Received: (from geoff@localhost) by hera.kernel.org (8.14.2/8.13.1/Submit) id n680IHOd026672; Wed, 8 Jul 2009 00:18:17 GMT Message-Id: <20090708001136.377108490@am.sony.com> User-Agent: quilt/0.47-1 Date: Tue, 07 Jul 2009 17:11:55 -0700 From: Geoff Levand To: Jeremy Kerr In-Reply-To: <20090708001134.934244536@am.sony.com> References: <20090708001134.934244536@am.sony.com> Content-Disposition: inline; filename=nc-menu-remove-description.diff X-Virus-Scanned: ClamAV 0.93.3/9541/Tue Jul 7 17:31:53 2009 on hera.kernel.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Wed, 08 Jul 2009 00:18:18 +0000 (UTC) Cc: cbe-oss-dev@ozlabs.org Subject: [Cbe-oss-dev] [patch 21/31] petitboot: Remove nc menu description X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Remove some unused nc menu description code. Signed-off-by: Geoff Levand --- 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(-) --- 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);