aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-01 14:11:51 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-01 14:11:51 +0200
commit79c333899d318bf9b1eec3837833c7f0229d1906 (patch)
treed31f6513d6284bcc8dc9a7ec8523ec2fdfa1944c /include
parent3b43f166629efbb34e1b0ceeaa2f06452d0fed2f (diff)
Move some application specific stuff out of libutil
This commit does the following: - canonicalize_name is moved to libfstree - source_date_epoch is only used inside libfstree, so it's also moved over and can later be completely internalized - print_version is moved over to sqfshelper. Mainly so it doesn't end up in libsquashfs.so for no sane reason. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/fstree.h17
-rw-r--r--include/util.h16
2 files changed, 17 insertions, 16 deletions
diff --git a/include/fstree.h b/include/fstree.h
index 5b853f3..7ee105b 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -339,4 +339,21 @@ uint64_t find_equal_blocks(file_info_t *file, file_info_t *list,
void optimize_unpack_order(fstree_t *fs, size_t num_jobs,
file_info_t *out[num_jobs]);
+
+/*
+ Convert back to forward slashed, remove all preceeding and trailing slashes,
+ collapse all sequences of slashes, remove all path components that are '.'
+ and returns failure state if one of the path components is '..'.
+
+ Returns 0 on success.
+*/
+int canonicalize_name(char *filename);
+
+/*
+ If the environment variable SOURCE_DATE_EPOCH is set to a parsable number
+ that fits into an unsigned 32 bit value, return its value. Otherwise,
+ default to 0.
+ */
+uint32_t get_source_date_epoch(void);
+
#endif /* FSTREE_H */
diff --git a/include/util.h b/include/util.h
index ba95b03..651a958 100644
--- a/include/util.h
+++ b/include/util.h
@@ -47,15 +47,6 @@ typedef struct sparse_map_t {
} sparse_map_t;
/*
- Convert back to forward slashed, remove all preceeding and trailing slashes,
- collapse all sequences of slashes, remove all path components that are '.'
- and returns failure state if one of the path components is '..'.
-
- Returns 0 on success.
-*/
-int canonicalize_name(char *filename);
-
-/*
A wrapper around the write() system call. It retries the write if it is
interrupted by a signal or only part of the data was written. Returns 0
on success. Writes to stderr on failure using 'errstr' as a perror style
@@ -109,13 +100,6 @@ int popd(void);
int padd_file(int outfd, uint64_t size, size_t blocksize);
/*
- If the environment variable SOURCE_DATE_EPOCH is set to a parsable number
- that fits into an unsigned 32 bit value, return its value. Otherwise,
- default to 0.
- */
-uint32_t get_source_date_epoch(void);
-
-/*
Helper for allocating data structures with flexible array members.
'base_size' is the size of the struct itself, 'item_size' the size of a