mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* strtoull_suffix
@ 2013-09-29 11:57 Yi Qingliang
  2013-09-30  8:13 ` strtoull_suffix Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Qingliang @ 2013-09-29 11:57 UTC (permalink / raw)
  To: barebox

the strtoull_suffix can't identify 'g' and 'm', but the 'memparse' in kernel 
can, do we should follow the kernel? 

indeed, i have problem about parsing following kernel parameter: 
nand_parts="512k(bl),512k(env),5m(mk),5m(sk),-(ubifs)

  37         switch (*end) {
  38         case 'G':
  39                 val *= 1024;
  40         case 'M':
  41                 val *= 1024;
  42         case 'k':
  43         case 'K':
  44                 val *= 1024;
  45                 end++;
  46         default:
  47                 break;
  48         }


-- 
Nanjing Jilong
Yi Qingliang
niqingliang2003@gmail.com

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: strtoull_suffix
  2013-09-29 11:57 strtoull_suffix Yi Qingliang
@ 2013-09-30  8:13 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2013-09-30  8:13 UTC (permalink / raw)
  To: Yi Qingliang; +Cc: barebox

Hi,

On Sun, Sep 29, 2013 at 07:57:39PM +0800, Yi Qingliang wrote:
> the strtoull_suffix can't identify 'g' and 'm', but the 'memparse' in kernel 
> can, do we should follow the kernel?

Go ahead and send a patch. I remember the original reason I haven't
supported 'm' was that it reminded me too much on 'milli'. I still
haven't seen a millibyte though...

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-30  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-29 11:57 strtoull_suffix Yi Qingliang
2013-09-30  8:13 ` strtoull_suffix Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox