This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit ce5dd72afc7ac1400644d2d1640fbd1a797ac4b6 Author: Bowen Wang <[email protected]> AuthorDate: Thu Apr 23 22:28:54 2026 +0800 drivers/rptun: dump RSC_TRACE entries in rptun_dump_resource() rptun_dump_resource() reported RSC_TRACE entries as an unsupported resource type. Print their name, device address, length and reserved field like the other entries, and return early when the resource table is NULL. Signed-off-by: Bowen Wang <[email protected]> --- drivers/rptun/rptun.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index 630e29d29de..098c221c7dc 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -1602,6 +1602,17 @@ static void rptun_dump_carveout_rsc(FAR void *rsc, uint32_t index) car->da, car->pa, car->len, car->flags, car->reserved); } +static void rptun_dump_trace_rsc(FAR void *rsc, uint32_t index) +{ + FAR struct fw_rsc_trace *trc = rsc; + + rptunvbs("[trace] Rsc %" PRIu32 " %p\n", index, rsc); + rptunvbs("[trace] Trace %s\n", trc->name); + rptunvbs("[trace] da 0x%08" PRIx32 " len %" PRIu32 + " reserved %" PRIu32 "\n", + trc->da, trc->len, trc->reserved); +} + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -1663,6 +1674,12 @@ void rptun_dump_resource(FAR const struct resource_table *rsc) FAR struct fw_rsc_hdr *hdr; uint32_t i; + if (rsc == NULL) + { + rptunerr("Resource table is NULL\n"); + return; + } + rptunvbs("Dump resource table: %p num: %" PRIu32 "\n", rsc, rsc->num); for (i = 0; i < rsc->num; i++) { @@ -1675,6 +1692,9 @@ void rptun_dump_resource(FAR const struct resource_table *rsc) case RSC_CARVEOUT: rptun_dump_carveout_rsc(hdr, i); break; + case RSC_TRACE: + rptun_dump_trace_rsc(hdr, i); + break; default: rptunerr("Not support rsc type: %" PRIu32 " %" PRIu32 "\n", i, hdr->type);
