summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fs.h22
-rw-r--r--include/image.h1
-rw-r--r--include/libfile.h4
-rw-r--r--include/uimagefs.h2
4 files changed, 12 insertions, 17 deletions
diff --git a/include/fs.h b/include/fs.h
index 3d88bfad4a..e6fcd044dd 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -101,24 +101,14 @@ struct fs_device_d {
char *linux_rootarg;
};
-/*
- * Some filesystems i.e. tftpfs only support lseek into one direction.
- * To detect this limited functionality we add this extra function.
- * Additionaly we also return 0 if we even can not seek forward.
- */
-static inline int can_lseek_backward(int fd)
-{
- int ret;
+bool __is_tftp_fs(const char *path);
- ret = lseek(fd, 1, SEEK_SET);
- if (ret < 0)
- return 0;
-
- ret = lseek(fd, 0, SEEK_SET);
- if (ret < 0)
- return 0;
+static inline bool is_tftp_fs(const char *path)
+{
+ if (!IS_ENABLED(CONFIG_FS_TFTP))
+ return false;
- return 1;
+ return __is_tftp_fs(path);
}
#define drv_to_fs_driver(d) container_of(d, struct fs_driver_d, drv)
diff --git a/include/image.h b/include/image.h
index 3e75d49b88..add9c85874 100644
--- a/include/image.h
+++ b/include/image.h
@@ -246,6 +246,7 @@ struct resource *file_to_sdram(const char *filename, unsigned long adr);
struct uimage_handle {
struct image_header header;
char *name;
+ char *copy;
struct uimage_handle_data ihd[MAX_MULTI_IMAGE_COUNT];
int nb_data_entries;
size_t data_offset;
diff --git a/include/libfile.h b/include/libfile.h
index eb4311d0bc..fd2fadeaa8 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -26,4 +26,8 @@ int make_directory(const char *pathname);
int unlink_recursive(const char *path, char **failedpath);
+char *make_temp(const char *template);
+
+int cache_file(const char *path, char **newpath);
+
#endif /* __LIBFILE_H */
diff --git a/include/uimagefs.h b/include/uimagefs.h
index 81b32310ad..3f58589b73 100644
--- a/include/uimagefs.h
+++ b/include/uimagefs.h
@@ -45,7 +45,7 @@ struct uimagefs_handle {
struct image_header header;
int nb_data_entries;
char *filename;
- char *tmp;
+ char *copy;
struct list_head list;
};