diff mbox series

[BlueZ,1/2] l2test: Enable hex input for PSM

Message ID 20230323102732.566440-2-simon.mikuda@streamunlimited.com
State New
Headers show
Series l2test fix+feature | expand

Commit Message

Simon Mikuda March 23, 2023, 10:27 a.m. UTC
---
 tools/l2test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/l2test.c b/tools/l2test.c
index 5aae4b687..595f1dab2 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -1416,7 +1416,10 @@  int main(int argc, char *argv[])
 			break;
 
 		case 'P':
-			psm = atoi(optarg);
+			if (!strncasecmp(optarg, "0x", 2))
+				psm = strtoul(&optarg[2], NULL, 16);
+			else
+				psm = atoi(optarg);
 			break;
 
 		case 'I':