[PATCH v2 0/8] Make TFTP detection more convenient

Sascha Hauer s.hauer at pengutronix.de
Wed Jan 24 23:45:12 PST 2018


We can't lseek on files provided by TFTP, so some code copies the file
to operate on from TFTP to RAM before continuing. Make this a bit easier
by providing some helper code. We now create /tmp/, provide make_temp()
to create temporary files and also a single function to create a copy
of a file in /tmp/.

Changes since v1:
- Integrated changes suggested by Stefan Lengfeld

Sascha Hauer (8):
  startup: create /tmp
  fs: implement is_tftp_fs()
  libfile: implement make_temp
  libfile: implement a function to cache a file
  uimage: fix memory leak in error path
  uimage: Use is_tftp_fs() and cache_file() to ease TFTP workaround
  fs/uimagefs: Use is_tftp_fs() and cache_file() to ease TFTP workaround
  fs: remove now unused function can_lseek_backward()

 common/startup.c   |  1 +
 common/uimage.c    | 49 ++++++++++++++++++++++++------------------------
 fs/fs.c            | 22 ++++++++++++++++++++++
 fs/uimagefs.c      | 37 +++++++++++++-----------------------
 include/fs.h       | 22 ++++++----------------
 include/image.h    |  1 +
 include/libfile.h  |  4 ++++
 include/uimagefs.h |  2 +-
 lib/libfile.c      | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 127 insertions(+), 66 deletions(-)

-- 
2.15.1




More information about the barebox mailing list