summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* lzo: Remove unused variableAlexander Shiyan2014-04-231-2/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: Fix resource leakAlexander Shiyan2014-04-231-0/+4
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-232-2/+2
| | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* unlink_recursive: return negative error valueSascha Hauer2014-04-091-1/+1
| | | | | | | In case of an error unlink_recursive returns errno which is positive. Return -errno instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2014-04-041-5/+5
|\
| * mtd: Update internal API to support 64-bit device sizeDmitry Lavnikevich2014-03-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats; - division and modulus of 64-bit values (mtd_div_by_wb, mtd_div_by_eb may be used in some of such cases). Was tested on phyFLEX i.MX6. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Grigory Milev <g.milev@sam-solutions.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2014-04-041-0/+87
|\ \
| * | param: Add dev_add_param_macSascha Hauer2014-04-041-0/+87
| | | | | | | | | | | | | | | | | | | | | This adds a convenience function to register a MAC address device parameter. The only current user is converted to use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | string.c: Fix includeSascha Hauer2014-03-291-1/+1
|/ / | | | | | | | | | | | | | | string.c needs string.h, otherwise we get: lib/string.c:730: warning: no previous prototype for 'memdup' Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / splash: Print error message when no renderer is foundSascha Hauer2014-03-171-0/+2
|/ | | | | | | the splash command silently fails when no renderer is found for an image type. Print an error message in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubi'Sascha Hauer2014-03-071-1/+1
|\ | | | | | | | | Conflicts: drivers/mtd/ubi/cdev.c
| * param: dev_add_param_fixed: constify argumentSascha Hauer2014-02-281-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/nfs'Sascha Hauer2014-03-071-1/+1
|\ \ | | | | | | | | | | | | Conflicts: defaultenv/defaultenv-2-base/bin/ifup
| * | mount: support filesystem options passed via -oUwe Kleine-König2014-02-101-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Similar to mount(8) the barebox command mount now supports passing a string to the file system driver via -o. This is used in the next commit to let the user specify port numbers for nfs mounts. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2014-03-073-6/+5
|\ \ | | | | | | | | | | | | Conflicts: common/environment.c
| * | lib: math: Return NULL pointerFabio Estevam2014-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following sparse warning: lib/math.c:309:16: warning: Using plain integer as NULL pointer Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: libbb: f should never be NULLLucas Stach2014-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We assume it to be non NULL in other places, so we are in much greater trouble if it actually is. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: math: fix return path (numstack may be NULL)Lucas Stach2014-02-101-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remove redundant NULL check on freeLucas Stach2014-02-101-2/+1
| |/ | | | | | | | | | | | | | | free() already checks the pointer to be non NULL. No need to do it again. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / input: Add BB_ prefix to KEY_ definesSascha Hauer2014-02-172-31/+31
|/ | | | | | | Our KEY_ defines conflict with the standard Linux KEY_ defines, so add a BB_ prefix to them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-01-076-6/+1
|\
| * lib: fix whitespace, drop blank lines at EOFAntony Pavlov2014-01-066-6/+1
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: libubigen math compile error fixRobert Jarzmik2014-01-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | A compile error appears in libubigen on PXA architecture, because of a division of an long long by a int : /home/rj/mio_linux/barebox/lib/libubigen.c:105: undefined reference to `__aeabi_ldivmod' arm-linux-gnueabi-ld: BFD (GNU Binutils for Debian) 2.20.1.20100303 assertion fail ../../bfd/elf32-arm.c:12497 Fix it by using div_u64 instead. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: Add subpagesize to mtd_info_userSascha Hauer2013-12-201-1/+1
|/ | | | | | | | | ubiformat needs the subpagesize to work correctly. The kernel uses sysfs to pass the subpagesize, but in barebox we have the possibility to extend struct mtd_info_user. Add a corresponding field and use it in ubiformat. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/omap-drivers'Sascha Hauer2013-12-062-0/+24
|\
| * string: Add (x)memdupSascha Hauer2013-11-272-0/+24
| | | | | | | | | | | | It's a common task to duplicate some memory. Add (x)memdup functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-12-064-3/+5
|\ \ | | | | | | | | | | | | Conflicts: scripts/Makefile
| * | barebox: remove double semicolonsAlexander Aring2013-11-181-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gui: Fix signed/unsigned arguments for printfAlexander Shiyan2013-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | "%u" in format string requires a unsigned integer. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: Add missing includesSascha Hauer2013-11-082-0/+2
| |/ | | | | | | | | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / readline: remove unused variableSascha Hauer2013-11-121-2/+1
|/ | | | | | 'rc' is never set to anything else than 0, so drop it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: convert the bmp renderer to respect line_lengthAndre Heider2013-11-061-4/+4
| | | | | Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: convert graphic utils to respect line_lengthAndre Heider2013-11-061-5/+5
| | | | | Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add function to read single line filesSascha Hauer2013-10-141-0/+43
| | | | | | | Often small files are used to store the value od a variable. This adds a function to easily read such a variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-10-071-0/+7
|\ | | | | | | | | Conflicts: commands/Makefile
| * process_escape_sequence: add support to \$?Jean-Christophe PLAGNIOL-VILLARD2013-09-181-0/+7
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/lzo'Sascha Hauer2013-10-076-402/+454
|\ \
| * | lzo: update to lzo-2013Jean-Christophe PLAGNIOL-VILLARD2013-09-226-402/+454
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | take from linux next-20130227 same version as v3.11 before -rwxr-xr-x 1 root root 123001 Feb 28 01:04 build/highbank/arch/arm/pbl/zbarebox.bin after -rwxr-xr-x 1 root root 122226 Feb 28 01:02 build/highbank/arch/arm/pbl/zbarebox.bin smaller and faster Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | copy_file: Add missing O_TRUNCSascha Hauer2013-09-291-1/+1
| | | | | | | | | | | | | | Without it, when copying a smaller file over a larger file the resulting file still has the remaining space from the larger file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: Fix copy_file when filesize is FILESIZE_MAXTeresa Gámez2013-09-272-4/+9
|/ | | | | | | | | | Using tftp command does not work proper when files have FILESIZE_MAX, as copy_file and show_progress can not handle it. Check the file size for FILESIZE_MAX and handle it as file size = 0. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/boardinfo'Sascha Hauer2013-09-051-1/+1
|\ | | | | | | | | | | | | Conflicts: arch/mips/boards/qemu-malta/init.c commands/bootm.c drivers/of/base.c
| * remove remaining references of CONFIG_BOARDINFOSascha Hauer2013-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | With this all code uses barebox_get_model() and no longer a compile time generated string. Also this renames barebox_boardinfo() to barebox_get_model() since we are going to add the corresponding _set_ function and 'model' corresponds to the devicetree notion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ubifs'Sascha Hauer2013-09-051-0/+39
|\ \ | |/ |/|
| * Add deflate_decompress functionSascha Hauer2013-08-071-0/+39
| | | | | | | | | | | | Needed to implement decompressors for gzip without headers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Cleanup Kconfig filesAlexander Shiyan2013-08-121-1/+1
|/ | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2013-08-055-1/+129
|\
| * UBI: reimport UBI from Linux v3.10Sascha Hauer2013-07-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | This is a fresh UBI import from Linux v3.10 This is done mainly to get fastmap support. This was tested with the i.MX nand driver, the MXS nand driver and on CFI NOR flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: MXS: introduce stmp device supportSascha Hauer2013-07-233-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | MXS specific devices have some common infrastructure in the kernel known as STMP devices. We have the same in barebox, but with a mxs_ prefix instead of a stmp_ prefix. As some STMP devices are also found on i.MX6 move the common infrastructure out of MXS specific files and use the stmp_ prefix. This is done in preparation for i.MX6 NAND support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * string: introduce memchr_invSascha Hauer2013-07-221-0/+59
| | | | | | | | | | | | Directly taken from Linux Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-08-051-6/+6
|\ \