summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 16:36:58 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:45 +0100
commit5fb520b07182de04eea6373e95b580a88dca3037 (patch)
treea34c3e57f10ef9bea7a2347b6ff56fc9f4e2a6dc /include
parent9de315de437bac81eb08f32edb0a9a8e3c416ae8 (diff)
ubifs-utils: Adapt io.c in libubifs
Adapt io.c in libubifs, compared with linux kernel implementations: 1. Modify io related functions(eg. ubifs_leb_read/ubifs_leb_write, etc.), adapt them with userspace io functions lseek/read/write. 2. Remove some functions(eg. record_magic_error, ubifs_bg_wbufs_sync) which won't be used in fsck/mkfs. 3. Replce ubifs_errc with ubifs_err, because there will be no SB_SILENT options in mkfs/fsck. 4. Initiate wbuf->size as c->max_write_size. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/crc32.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crc32.h b/include/crc32.h
index 9c1f742..f5271f3 100644
--- a/include/crc32.h
+++ b/include/crc32.h
@@ -10,4 +10,9 @@
/* Return a 32-bit CRC of the contents of the buffer */
extern uint32_t mtd_crc32(uint32_t val, const void *ss, int len);
+static inline uint32_t crc32(uint32_t val, const void *ss, int len)
+{
+ return mtd_crc32(val, ss, len);
+}
+
#endif /* __CRC32_H__ */