[PATCH 26/26] nand command: Allow offsets with [kM] suffixes

Sascha Hauer s.hauer at pengutronix.de
Fri Nov 6 08:39:00 EST 2020


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 commands/nand-bitflip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/nand-bitflip.c b/commands/nand-bitflip.c
index 217a243f66..1395021ec0 100644
--- a/commands/nand-bitflip.c
+++ b/commands/nand-bitflip.c
@@ -53,7 +53,7 @@ static int do_nand_bitflip(int argc, char *argv[])
 			block = simple_strtoul(optarg, NULL, 0);
 			break;
 		case 'o':
-			offset = simple_strtoull(optarg, NULL, 0);
+			offset = strtoull_suffix(optarg, NULL, 0);
 			break;
 		case 'c':
 			check = 1;
-- 
2.20.1




More information about the barebox mailing list