Small patch
Hi,
I propose the following small patch so that the utils can acept arguments int hexadecimal form, e.g.
erase device 0x1f0000
instead of erase device 2031616.
K.D.
util/erase.c +2 -2
@@ -35,12 +35,12 @@printf ("Erase Unit Size 0x%lx, " , meminfo.erasesize);if (argc >2 ) - erase.start =atoi (argv[2 ]); + erase.start =strtol (argv[2 ],NULL ,0 );else erase.start =0 ;if (argc >3 ) - count =atoi (argv[3 ]); + count =strtol (argv[3 ],NULL ,0 );else count =1 ;
util/mkfs.ffs2.c +2 -2
@@ -65,11 +65,11 @@switch (Opt) {case 'b' : - BlockSize =atoi (optarg); + BlockSize =strtol (optarg,NULL ,0 );break ;case 's' : - Start =atoi (optarg); + Start =strtol (optarg,NULL ,0 );break ;case '?' :
util/mkfs.jffs.c +1 -1
@@ -698,7 +698,7 @@ }break ;case 'e' : -MAX_CHUNK_SIZE = (atoi (optarg) /2 ); +MAX_CHUNK_SIZE = (strtol (optarg,NULL ,0 ) /2 );break ;case 'h' :case '?' :
util/mkfs.jffs2.c +3 -3
@@ -430,7 +430,7 @@while ( (opt =getopt_long (argc, argv,"p:d:r:s:e:o:h?" , long_options, &c) ) >=0 ) {switch (opt) {case 'p' : - pad_fs_size =atoi (optarg); + pad_fs_size =strtol (optarg,NULL ,0 );break ;case 'r' :
@@ -447,11 +447,11 @@break ;case 's' : - page_size =atoi (optarg); + page_size =strtol (optarg,NULL ,0 );break ;case 'e' : - erase_block_size =atoi (optarg); + erase_block_size =strtol (optarg,NULL ,0 );break ;case 'o' :
Quoted 4 lines
I propose the following small patch so that the utils can acept arguments int hexadecimal form, e.g.
erase device 0x1f0000instead of erase device 2031616.
smart move, david, please apply this when you get a chance
To unsubscribe, send "unsubscribe mtd" to [email protected]
David Woodhouse
AppliedQuoted 4 lines · K�ri Dav��sson
I propose the following small patch so that the utils can acept arguments int hexadecimal form, e.g.
erase device 0x1f0000instead of erase device 2031616.
Applied, thanks.
Signature · 6 lines
dwmw2 To unsubscribe, send "unsubscribe mtd" to [email protected]