mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2025-02-17 01:19:53 +00:00
![Bart Van Assche](/assets/img/avatar_default.png)
commit 98f7f56cf35c352c1ff3d83ad1e72e5b1e5fdf84 category: bugfix issue: #I6VAS0 CVE: NA Signed-off-by: DongSenhao <dongsenhao2@huawei.com> --------------------------------------- Suppress the following compiler warning: f2fs_format.c:1653:37: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN, ~~~~^~~~~~~~~~~~~~~ f2fs_format.c:1653:37: note: use array indexing to silence this warning memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN, ^ & [ ] Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
F2FS format utility
To use the f2fs filesystem, you should format the storage partition with this utility. Otherwise, you cannot mount f2fs.
Before compilation
You should install the following packages.
- libuuid-devel or uuid-dev
- autoconf
- libtool
- libselinux1-dev
Initial compilation
Before initial compilation, autoconf/automake tools should be run.
./autogen.sh
How to compile
./configure
make
make install
How to cross-compile (e.g., for ARM)
-
Add the below line into mkfs/Makefile.am:
mkfs_f2fs_LDFLAGS = -all-static -
Add the below line into fsck/Makefile.am:
fsck_f2fs_LDFLAGS = -all-static -
then, do:
LDFLAGS=--static ./configure
--host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi
make
How to run by default
mkfs.f2fs -l [LABEL] $DEV
For more mkfs options, see the man page.
Description
Languages
C
98.1%
Shell
0.7%
M4
0.6%
Makefile
0.3%
Roff
0.3%