9
0
Fork 0
Commit Graph

5 Commits

Author SHA1 Message Date
Sascha Hauer 9f11887009 libfile: Add copy_recursive
To recursively copy a directory tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 10:58:55 +01:00
Sascha Hauer 6cf5b986d9 libfile: add compare_file function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-09 08:47:18 +02:00
Teresa Gámez 9d50b34845 read_file_2: Fix return value
Set return value correct in error case.
This prevents barebox from crashing in some conditions.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 07:44:12 +02:00
Sascha Hauer 28ce918d96 read_file: introduce read_file_2
read_file has some limitations:

- It is not possible to check the error code since read_file returns
  NULL for failure
- It is not possible to limit the buffer size to sensible limits.

This patch introduces read_file_2 which doesn't have these limitations.
read_file becomes a wrapper around read_file_2.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:52 +02:00
Sascha Hauer 3cfa4bc00c move file helper functions to separate file
We have our file helper functions in several places. Move them
all to lib/libfile.c.
With this we no longer have file helpers in fs/fs.c which contains
the core fs functions and no functions in lib/libbb.c which are
not from busybox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:51 +02:00