summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 22:45:20 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 22:45:20 +0200
commit2f1b5d44343aac079af2671e97aa3ffd5c7e4b66 (patch)
treea2083d5c5c52e2a2ebb35cb3439acd35e1dfc45b
parent1e96ff63a77883879230dbc291d4afc997f2e1b1 (diff)
Replace usage of mode_t in libsquashfs with sqfs_u16
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--include/sqfs/dir_writer.h2
-rw-r--r--lib/sqfs/dir_writer.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/sqfs/dir_writer.h b/include/sqfs/dir_writer.h
index c015871..0679be3 100644
--- a/include/sqfs/dir_writer.h
+++ b/include/sqfs/dir_writer.h
@@ -115,7 +115,7 @@ SQFS_API int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer);
SQFS_API int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer,
const char *name,
sqfs_u32 inode_num, sqfs_u64 inode_ref,
- mode_t mode);
+ sqfs_u16 mode);
/**
* @brief Finish writing a directory listing and write everything out to the
diff --git a/lib/sqfs/dir_writer.c b/lib/sqfs/dir_writer.c
index cae1e63..2efc10d 100644
--- a/lib/sqfs/dir_writer.c
+++ b/lib/sqfs/dir_writer.c
@@ -50,7 +50,7 @@ struct sqfs_dir_writer_t {
sqfs_meta_writer_t *dm;
};
-static int get_type(mode_t mode)
+static int get_type(sqfs_u16 mode)
{
switch (mode & S_IFMT) {
case S_IFSOCK: return SQFS_INODE_SOCKET;
@@ -121,7 +121,7 @@ int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer)
int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer, const char *name,
sqfs_u32 inode_num, sqfs_u64 inode_ref,
- mode_t mode)
+ sqfs_u16 mode)
{
dir_entry_t *ent;
int type;