From patchwork Sun Dec 7 20:16:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 821 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138652; bh=PUVhxDqlRIagJYDXtF6adzHNpCNPrcvn1fl2OSRiErY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TR/VQ8NCjtzw78Skg+TPz5uaHeqU33WPOv64Xb3iY6rgPR9+rUA/0W05ZzE+N1wYj tYukN5nKh88uDrALMnobV7EGZpTrZSGRPP0gUsH9WcgDw7dMzkOtwJN+UMBZLSTRJo FaKSGLX/CukNzSAiVL4F2fqoQwbeYd8jaB8vhx3AkNm8Ul4Lt8JwxCYj15FWoVT4eW aAcJY3Zv3WEOoV1EOa/5U3f8PqRpa0IWIkZF49P4jii2HxaWLkyD1QCX15B1QcD7Gd XWbqp+qMp4XF5pZVbGwA0tSvGXGOK6H1IHOfOTgo+ve7EPIWA+C3YshhZKBerrlNJ8 Tgrd1JUkK3usw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D13885F6BF for ; Sun, 7 Dec 2025 13:17:32 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 9vvWp3TYNdWh for ; Sun, 7 Dec 2025 13:17:32 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138651; bh=PUVhxDqlRIagJYDXtF6adzHNpCNPrcvn1fl2OSRiErY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Y4xLzNyuURduIXWPsV4IvI5QcoJb6vhsRPSXs1o4bETorObUABa/uW/tydRyBMfv6 Nfm97eKOE/9TZl1WHNKURAh+xYLwG7qlFWUAx3uhJvRK8EKZqtVHL/WtfLW1qe3GZ5 WIk2E+nwKU9TvZQqyWI1XGQ3o3psw5YqZ17NUOPgIMBQe67AUwvcT/FH4H0KbJ1S1w e5WQah9HGG5b7vdSrL3URTN98DI3YqRUpM203P9hsZveK4iqZSwyQyHP6D+GNHxtMT Jp+lujToCWn5fn+GmBR0iF1bE4g+9UFYYkMshFzZedS7BWrrAaQo/+AaeOZyNN/9vH q40ENjPZ4pwLg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BE22A68950 for ; Sun, 7 Dec 2025 13:17:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138649; bh=fi3yhDkKeizDWsfYB8llKL0NJiOP5RQofPcX6ASlvDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QXvnpiUNO3jlGFHBWR/KCsFoHHNEa+am5+vQEMXAtQidPSMOr2zx/peI3z6MFRTEJ kV91qixgJB6yY+GfXbAIdrPuiYjF2B9b2YPtm/XCmkJ620tHePeFHPqpVBhUWI0jjX hh2u5IJE+UCm85K0amAvE2CR0I/IAObZa75EEr2IxHpDHqXnedWlh3LvekOS8Eo9BY 2/TuDXV+a7P/s4YkhDKd/5bN4Q0IrpHVroJfgUKKA84SkTDQDbPTlAqQgWN0WgaebK NaVe+5l87Z7wG21uE+mVN+wiafxZNhvIZsPXPb6zrFPHVCRq6Hmtx5M1xOmAuamciZ 4UQUAp2tT+4wg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D13CC5F6BF; Sun, 7 Dec 2025 13:17:29 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id Lk462c84DyBB; Sun, 7 Dec 2025 13:17:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138649; bh=URhVKV/IAZ/sCFikqpzk0TMl/f4oqA9htTqdlkRVnj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F/I/JsJw7kBq4Klvb4jE2TOVkY/Jl/cF4/SHpKkhG9VP1jgfRXsio0yOJI2LgyB/s gJN3YNgwoKJvYd22qVhXLqMYxV+1n2BsRGJoetePc7bTgbqesb4V63A+94Rm0iJoxU cubV7MEv/kh/tWAuOXaD/HjMD6m3Kmcmfl6c55EY/mCWdMLv9pd8clEUsMPSVZNePO WLk1/whm3fkBI9TD48gnpyp12hMM4ZJNHXA9oViIkPWUlpdzmucOqRrTCtYsGORw9i S2jDLgqHImLD9BWNzg6kvtJ+e2tCBnNjBKzVxofOyaTp1022pH8wYKtyngg8WEOEMb 7MrFraVOsFcFw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 10D516883E; Sun, 7 Dec 2025 13:17:28 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 7 Dec 2025 13:16:06 -0700 Message-ID: <20251207201628.2882382-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251207201628.2882382-1-sjg@u-boot.org> References: <20251207201628.2882382-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: YPBXHU6LDWXAFDRYHBK5XNMLQB2W2XCA X-Message-ID-Hash: YPBXHU6LDWXAFDRYHBK5XNMLQB2W2XCA X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/22] expo: Use hex format when dumping the expo List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Change expo_dump() to output object IDs in hex format. This matches the normal convention in U-Boot. Also add key_id and preview_id to the menu item dump output while we are here. Co-developed-by: Claude Signed-off-by: Simon Glass --- boot/expo_dump.c | 51 ++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/boot/expo_dump.c b/boot/expo_dump.c index 711b26eb220..eb0c7bce6fc 100644 --- a/boot/expo_dump.c +++ b/boot/expo_dump.c @@ -67,14 +67,15 @@ static void dump_menu(struct dump_ctx *ctx, struct scene_obj_menu *menu) struct scene_obj *obj = &menu->obj; struct scene_menitem *item; - outf(ctx, "Menu: pointer_id %d title_id %d manual %d\n", + outf(ctx, "Menu: pointer_id %x title_id %x manual %d\n", menu->pointer_id, menu->title_id, !!(obj->flags & SCENEOF_MANUAL)); ctx->indent += 2; list_for_each_entry(item, &menu->item_head, sibling) { - outf(ctx, "Item %d: name '%s' label_id %d desc_id %d\n", - item->id, item->name, item->label_id, item->desc_id); + outf(ctx, "Item %x: name '%s' key_id %x label_id %x desc_id %x preview_id %x\n", + item->id, item->name, item->key_id, item->label_id, + item->desc_id, item->preview_id); } ctx->indent -= 2; } @@ -83,7 +84,7 @@ static void dump_text(struct dump_ctx *ctx, struct scene_obj_txt *txt) { const char *str = expo_get_str(ctx->scn->expo, txt->gen.str_id); - outf(ctx, "Text: str_id %d font_name '%s' font_size %d\n", + outf(ctx, "Text: str_id %x font_name '%s' font_size %x\n", txt->gen.str_id, txt->gen.font_name ? txt->gen.font_name : "(default)", txt->gen.font_size); @@ -94,7 +95,7 @@ static void dump_text(struct dump_ctx *ctx, struct scene_obj_txt *txt) static void dump_box(struct dump_ctx *ctx, struct scene_obj_box *box) { - outf(ctx, "Box: fill %d width %d\n", box->fill, box->width); + outf(ctx, "Box: fill %d width %x\n", box->fill, box->width); } static void dump_image(struct dump_ctx *ctx, struct scene_obj_img *img) @@ -105,17 +106,17 @@ static void dump_image(struct dump_ctx *ctx, struct scene_obj_img *img) static void dump_textline(struct dump_ctx *ctx, struct scene_obj_textline *tline) { - outf(ctx, "Textline: label_id %d edit_id %d\n", + outf(ctx, "Textline: label_id %x edit_id %x\n", tline->label_id, tline->edit_id); ctx->indent += 2; - outf(ctx, "max_chars %d pos %d\n", tline->max_chars, tline->pos); + outf(ctx, "max_chars %x pos %x\n", tline->max_chars, tline->pos); ctx->indent -= 2; } static void dump_textedit(struct dump_ctx *ctx, struct scene_obj_txtedit *tedit) { - outf(ctx, "Textedit: str_id %d font_name '%s' font_size %d\n", + outf(ctx, "Textedit: str_id %x font_name '%s' font_size %x\n", tedit->gen.str_id, tedit->gen.font_name ? tedit->gen.font_name : "(default)", tedit->gen.font_size); @@ -128,7 +129,7 @@ static void obj_dump_(struct dump_ctx *ctx, struct scene_obj *obj) int bit; int pos = 0; - outf(ctx, "Object %d (%s): type %s\n", obj->id, obj->name, + outf(ctx, "Object %x (%s): type %s\n", obj->id, obj->name, scene_obj_type_name(obj->type)); ctx->indent += 2; @@ -144,9 +145,9 @@ static void obj_dump_(struct dump_ctx *ctx, struct scene_obj *obj) } } outf(ctx, "flags %s\n", pos > 0 ? flags_buf : ""); - outf(ctx, "bbox: (%d,%d)-(%d,%d)\n", + outf(ctx, "bbox: (%x,%x)-(%x,%x)\n", obj->bbox.x0, obj->bbox.y0, obj->bbox.x1, obj->bbox.y1); - outf(ctx, "dims: %dx%d\n", obj->dims.x, obj->dims.y); + outf(ctx, "dims: %xx%x\n", obj->dims.x, obj->dims.y); switch (obj->type) { case SCENEOBJT_NONE: @@ -177,11 +178,11 @@ static void scene_dump_(struct dump_ctx *ctx) { struct scene_obj *obj; - outf(ctx, "Scene %d: name '%s'\n", ctx->scn->id, ctx->scn->name); + outf(ctx, "Scene %x: name '%s'\n", ctx->scn->id, ctx->scn->name); ctx->indent += 2; - outf(ctx, "title_id %d (%s)\n", + outf(ctx, "title_id %x (%s)\n", ctx->scn->title_id, obj_name(ctx, ctx->scn->title_id)); - outf(ctx, "highlight_id %d (%s)\n", + outf(ctx, "highlight_id %x (%s)\n", ctx->scn->highlight_id, obj_name(ctx, ctx->scn->highlight_id)); list_for_each_entry(obj, &ctx->scn->obj_head, sibling) { @@ -215,20 +216,20 @@ static void expo_dump_(struct dump_ctx *ctx, struct expo *exp) exp->display ? exp->display->name : "(null)"); outf(ctx, "cons %s\n", exp->cons ? exp->cons->name : "(none)"); outf(ctx, "mouse %s\n", exp->mouse ? exp->mouse->name : "(none)"); - outf(ctx, "scene_id %d\n", exp->scene_id); - outf(ctx, "next_id %d\n", exp->next_id); - outf(ctx, "req_width %d\n", exp->req_width); - outf(ctx, "req_height %d\n", exp->req_height); + outf(ctx, "scene_id %x\n", exp->scene_id); + outf(ctx, "next_id %x\n", exp->next_id); + outf(ctx, "req_width %x\n", exp->req_width); + outf(ctx, "req_height %x\n", exp->req_height); outf(ctx, "text_mode %d\n", exp->text_mode); outf(ctx, "popup %d\n", exp->popup); outf(ctx, "show_highlight %d\n", exp->show_highlight); outf(ctx, "mouse_enabled %d\n", exp->mouse_enabled); outf(ctx, "mouse_ptr %p\n", exp->mouse_ptr); - outf(ctx, "mouse_size %dx%d\n", exp->mouse_size.w, + outf(ctx, "mouse_size %xx%x\n", exp->mouse_size.w, exp->mouse_size.h); - outf(ctx, "mouse_pos (%d,%d)\n", exp->mouse_pos.x, + outf(ctx, "mouse_pos (%x,%x)\n", exp->mouse_pos.x, exp->mouse_pos.y); - outf(ctx, "damage (%d,%d)-(%d,%d)\n", exp->damage.x0, exp->damage.y0, + outf(ctx, "damage (%x,%x)-(%x,%x)\n", exp->damage.x0, exp->damage.y0, exp->damage.x1, exp->damage.y1); outf(ctx, "done %d\n", exp->done); outf(ctx, "save %d\n", exp->save); @@ -237,17 +238,17 @@ static void expo_dump_(struct dump_ctx *ctx, struct expo *exp) if (exp->display) { struct video_priv *vid_priv = dev_get_uclass_priv(exp->display); - outf(ctx, "video: %dx%d white_on_black %d\n", + outf(ctx, "video: %xx%x white_on_black %d\n", vid_priv->xsize, vid_priv->ysize, vid_priv->white_on_black); } outf(ctx, "Theme:\n"); ctx->indent = 4; - outf(ctx, "font_size %d\n", theme->font_size); + outf(ctx, "font_size %x\n", theme->font_size); outf(ctx, "white_on_black %d\n", theme->white_on_black); - outf(ctx, "menu_inset %d\n", theme->menu_inset); - outf(ctx, "menuitem_gap_y %d\n", theme->menuitem_gap_y); + outf(ctx, "menu_inset %x\n", theme->menu_inset); + outf(ctx, "menuitem_gap_y %x\n", theme->menuitem_gap_y); ctx->indent = 0; outf(ctx, "\nScenes:\n");