summaryrefslogtreecommitdiffstats
path: root/lib/cmdlinepart.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: replace strerror(-PTR_ERR(errno)) with %pe format specifierAhmad Fatoum2020-09-291-4/+3
| | | | | | | | | Using %pe instead of PTR_ERR has the benefit of being less verbose and less error-prone (no negation necessary) while potentially reducing code size. Make use of it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove references to CREDITSUwe Kleine-König2020-04-271-3/+0
| | | | | | | | The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97 ("Remove the CREDITS file"). Remove references to it from several files. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cmdlinepart: Allow empty stringSascha Hauer2018-07-091-0/+3
| | | | | | | | | | | | Currently when cmdlinepart_do_parse() is called with an empty partitions string then an unnamed partition with size 0 is created. This is wrong of course and instead no partition should be created. With this barebox no longer crashes while booting when all partitions are deleted on the commandline using "nand0.partitions=" Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cmndlinepart: skip devname if partstr already contains itSascha Hauer2015-02-121-1/+2
| | | | | | | When the partition name already starts with "devname." skip this when adding the partition. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cmdlinepart: add function to parse a cmdline partition stringSascha Hauer2015-02-121-0/+28
| | | | | | | This adds a function to parse a full cmdline partition string. The addpart command is switched to use this function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cmdlinepart: make argument types saferSascha Hauer2015-02-121-3/+3
| | | | | | | The return size should be loff_t to support partitions bigger than 4G. Also use const for the devname and endp. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cmdlinepart: Change SIZE_REMAINING to loff_tSascha Hauer2015-02-121-1/+1
| | | | | | For compatibility with devices > 4G. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move cmdline partition parsing code to separate fileSascha Hauer2015-02-121-0/+95
So it's no longer local to the addpart/delpart code and can be used from other code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>