[Pdbg] [PATCH 03/11] host: Make debugfs scom file hex digit not decimal

Michael Neuling mikey at neuling.org
Thu Jun 7 16:54:30 AEST 2018


The kernel uses hex numbers not decimal hence this was broken on a 2
DCM Tuletta which uses chip ids above 9.

Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 libpdbg/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libpdbg/host.c b/libpdbg/host.c
index 5e0e08fc33..483e04881c 100644
--- a/libpdbg/host.c
+++ b/libpdbg/host.c
@@ -95,7 +95,7 @@ static int host_pib_probe(struct pdbg_target *target)
 	if (chip_id == -1)
 		goto out;
 
-	if (asprintf(&access_fn, "%s/%08d/access", XSCOM_BASE_PATH, chip_id) < 0)
+	if (asprintf(&access_fn, "%s/%08x/access", XSCOM_BASE_PATH, chip_id) < 0)
 		goto out;
 
 	*fd = open(access_fn, O_RDWR);
-- 
2.17.0



More information about the Pdbg mailing list