summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-31AOSP: erofs-utils: add an alias make_erofs for mkfs.erofsHEADlineage-18.1Huang Jianan
Function LookupVariable in build/blueprint/scope.go treats mkfs.erofs as pkg.var, which causes mkfs.erofs can't be parsed. Don't use dot to avoid this problem. Bug: 195274797 Test: mmm system/apex/apexer/testdata Change-Id: Ifb90df7135a75e3752455e3ede6de50bcb43cefd
2021-08-31AOSP: erofs-utils: adapt for android buildGao Xiang
Squashed commit of the following: Author: Huang Jianan <huangjianan@oppo.com> Date: Fri Feb 19 16:34:28 2021 +0800 erofs-utils: support pre-defined timestamp and UUID in Android build Bug: 180682930 Test: erofs image can be set to input timestamp and UUID Change-Id: Ib93cf422c0410ba46867c5a1b91a7c40b06a281e Signed-off-by: Huang Jianan <huangjianan@oppo.com> Author: Alistair Delva <adelva@google.com> Date: Mon Nov 2 10:39:22 2020 -0800 Suppress darwin build of mkfs.erofs Bug: 172023026 Change-Id: Id051e0c504a896fbf7ebc34491f577a0766547b6 Author: Gao Xiang <hsiangkao@redhat.com> Date: Wed Jun 17 13:39:39 2020 +0800 Add Android build script Change-Id: I3e97e1040003728483ab73ef222c06b59800a2f3 Author: Gao Xiang <hsiangkao@redhat.com> Date: Wed Jun 17 10:57:19 2020 +0800 Add necessary Android.bp file Change-Id: If06b4849babb1806205cb26208407aea7e24e98f Change-Id: Iae92b719e58d5e5db4bf4382c8c803989953eb20 Signed-off-by: alk3pInjection <webmaster@raspii.tech>
2021-08-31AOSP: erofs-utils: fix sub-directory prefix for canned fs_configGao Xiang
"failed to find [%s] in canned fs_config" was observed by using "--fs-config-file" option as reported by Yue Hu [1]. The root cause was that the mountpoint prefix to subdirectories is also needed if "--mount-point" presents. However, such prefix cannot be added by just using erofs_fspath(). One exception is that the root directory itself needs to be handled specially for canned fs_config. For such case, the prefix of the root directory has to be dropped instead. [1] https://lkml.kernel.org/r/20201222020430.12512-1-zbestahu@gmail.com Link: https://lore.kernel.org/r/20201228105146.2939914-1-hsiangkao@redhat.com Fixes: 8a9e8046f170 ("AOSP: erofs-utils: add fs_config support") Reported-and-tested-by: Yue Hu <huyue2@yulong.com> Tested-by: Huang Jianan <huangjianan@oppo.com> Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com> (cherry picked from commit 26f7f29e800e857a3a823c1548c8b6e6a14b5416) Change-Id: Ifb74fe0905073c53ef158761f5de9f410f30c269
2020-11-22erofs-utils: stop building tree if file fails to openLi Guifu
stop and exit immediately if it fails to open a file, e.g mkfs.erofs doesn't run under the root user (e.g. run without sudo.) Link: https://lore.kernel.org/r/20201122085503.35139-1-bluce.lee@aliyun.com Signed-off-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-11-21erofs-utils: update READMEGao Xiang
Make it easier to understand... Link: https://lore.kernel.org/r/20201121022623.3882-2-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-11-21erofs-utils: drop known issue in READMEGao Xiang
Since lz4-1.9.3 has been released, https://github.com/lz4/lz4/releases/tag/v1.9.3 Move this lz4hc issue (lz4 <= 1.9.2) to "Comments" instead. Link: https://lore.kernel.org/r/20201121022623.3882-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-11-01mkfs: add option to use a pre-defined UUIDGao Xiang
Usage: mkfs.erofs -U<uuid> <imagefile> <srcdir> The filesystem UUID can now be optionally specified during filesystem creation. The default behavior is still to generate a random UUID. This is useful for reproducible builds. Link: https://lore.kernel.org/r/20201030123020.133084-4-hsiangkao@redhat.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-11-01mkfs: introduce erofs_mkfs_default_options()Gao Xiang
Gather all default settings, and generate UUID before parse_options_cfg(), therefore the UUID can be overridden later by command line for reproducible images. Link: https://lore.kernel.org/r/20201030123020.133084-3-hsiangkao@redhat.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-11-01erofs-utils: support $SOURCE_DATE_EPOCHGao Xiang
Currently, we use -T to set a given UNIX timestamp for all files, yet reproducible builds [1] requires what is called "timestamp clamping", IOW, a timestamp must be used no later than the value of this variable. Let's support $SOURCE_DATE_EPOCH as well. [1] https://reproducible-builds.org/specs/source-date-epoch/ Link: https://lore.kernel.org/r/20201030123020.133084-2-hsiangkao@redhat.com Suggested-by: nl6720 <nl6720@gmail.com> Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-11-01erofs-utils: fix build error without lz4 libraryGao Xiang
This fixes a recent build error if lz4 library doesn't install, /bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -I../include -g -O2 -o mkfs.erofs mkfs_erofs-main.o -luuid ../lib/liberofs.la -llz4 libtool: link: gcc -Wall -Werror -I../include -g -O2 -o mkfs.erofs mkfs_erofs-main.o -luuid ../lib/.libs/liberofs.a -llz4 /usr/bin/ld: cannot find -llz4 Link: https://lore.kernel.org/r/20201030123020.133084-1-hsiangkao@redhat.com Fixes: c497d89e5eac ("erofs-utils: enhance static linking for lz4 1.8.x") Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-11-01erofs-utils: fix the project prefix to "erofs-utils"Gao Xiang
Some of them were "erofs_utils" in source headers by mistake. Link: https://lore.kernel.org/r/20201024100516.14759-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-10-12erofs-utils: README: update known-issue status of lz4hcGao Xiang
Known issue of LZ4_compress_HC_destSize() mentioned in README was targeted by lz4 upstream days ago. Update README so all users can be noticed then. Link: https://lore.kernel.org/r/20201012073446.18103-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-10-12AOSP: erofs-utils: update usage due to fs_configGao Xiang
After fs_config support is added, usage() should be updated together as well. Fixes: 8a9e8046f170 ("AOSP: erofs-utils: add fs_config support") Link: https://lore.kernel.org/r/20201012003805.4068-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-10-10AOSP: erofs-utils: add fs_config supportGao Xiang
So that mkfs can directly generate images with fs_config. All code for AOSP is wrapped up with WITH_ANDROID macro. Link: https://lore.kernel.org/r/20200929051302.3324-1-hsiangkao@aol.com Acked-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-06-20erofs-utils: pass down inode for erofs_prepare_xattr_ibodyGao Xiang
Instead of several independent arguments for convenience. No logic changes. Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Link: https://lore.kernel.org/r/20200617072744.7979-1-hsiangkao@aol.com Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-06-08erofs-utils: enhance static linking for lz4 1.8.xGao Xiang
Since LZ4_compress_HC_destSize is static linking only on lz4 < 1.9.0, but usually both lz4 static and dynamic libraries are available. Previously, -all-static is used in erofs-utils compilation for such lz4 versions, but it has conficts with libselinux linking. Use another workable way [1] I've found instead. [1] https://stackoverflow.com/questions/8045707/how-to-link-to-the-libabc-a-instead-of-libabc-so Reviewed-and-tested-by: Li Guifu <bluce.lee@aliyun.com> Link: https://lore.kernel.org/r/20200531034510.5019-1-hsiangkao@aol.com Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-06-08erofs-utils: support selinux file contextsGao Xiang
Add --file-contexts flag that allows passing a selinux file_context file to setup file selabels. Reviewed-and-tested-by: Li Guifu <bluce.lee@aliyun.com> Link: https://lore.kernel.org/r/20200608130854.16953-1-hsiangkao@aol.com Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-04-14erofs-utils: release 1.1Gao Xiang
Signed-off-by: Gao Xiang <xiang@kernel.org>
2020-03-28erofs-utils: avoid PAGE_SIZE redefinitionGao Xiang
Buildroot autobuild reported a PAGE_SIZE redefinition with toolchain using musl, on x86 (32- or 64-bit) platforms [1] [2] [3]. (I didn't notice such report from erofs-utils travis CI or distribution builds before.) In file included from config.c:11: ../include/erofs/internal.h:27: error: "PAGE_SIZE" redefined [-Werror] #define PAGE_SIZE (1U << PAGE_SHIFT) In file included from ../include/erofs/defs.h:17, from ../include/erofs/config.h:12, from ../include/erofs/print.h:12, from config.c:10: .../sysroot/usr/include/limits.h:89: note: this is the location of the previous definition #define PAGE_SIZE PAGESIZE cc1: all warnings being treated as errors Fix it now. [1] http://autobuild.buildroot.net/results/340b98caa45bafd43f109002be9da59ba7f6d971 [2] http://autobuild.buildroot.net/results/42cd24535ab38cb9b416b730a034a1dbe3293bf5 [3] http://autobuild.buildroot.net/results/260cdb3203e9141e674f38a2acd127d10320f8fa Link: https://lore.kernel.org/r/20200325082930.2025-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-03-27erofs-utils: avoid using old compatibility type uintGao Xiang
This should fix the following buildroot autobuild issues with some configration on ARM platform [1]: compress.c: In function 'vle_compress_one': compress.c:209:10: error: unknown type name 'uint' const uint qh_aligned = round_down(ctx->head, EROFS_BLKSIZ); ^~~~ compress.c:210:10: error: unknown type name 'uint' const uint qh_after = ctx->head - qh_aligned; ^~~~ compress.c: In function 'z_erofs_convert_to_compacted_format': compress.c:313:8: error: unknown type name 'uint' const uint headerpos = Z_EROFS_VLE_EXTENT_ALIGN(inode->inode_isize + ^~~~ compress.c:316:8: error: unknown type name 'uint' const uint totalidx = (legacymetasize - ^~~~ [1] http://autobuild.buildroot.net/results/842a3c6416416d7badf4db9f38e3b231093a786a Link: https://lore.kernel.org/r/20200324081949.26355-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2020-03-27erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinitionGao Xiang
This patch can be used to resolve the following build errors: compress.c:10: error: "_LARGEFILE64_SOURCE" redefined [-Werror] #define _LARGEFILE64_SOURCE <command-line>: note: this is the location of the previous definition io.c:9: error: "_LARGEFILE64_SOURCE" redefined [-Werror] #define _LARGEFILE64_SOURCE <command-line>: note: this is the location of the previous definition Link: https://lore.kernel.org/r/20200314105256.20142-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2020-02-21erofs-utils: introduce exclude dirs and filesLi Guifu
Add excluded file feature "--exclude-path=" and '--exclude-regex=', which can be used to build EROFS image without some user specific files or dirs. The implementation is kept as simple as possible for now. Note that you may give multiple '--exclude-path' and '--exclude-regex' options. Signed-off-by: Li Guifu <bluce.lee@aliyun.com> Link: https://lore.kernel.org/r/20200219022056.GA56477@architecture4 Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2020-01-02erofs-utils: wrap up sb feature operationsGao Xiang
Add some helpers for shorter lines. No logic change. Link: https://lore.kernel.org/r/20191231082200.152744-1-gaoxiang25@huawei.com Reviewed-by: Li Guifu <blucer.lee@foxmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-12-20erofs-utils: clean up erofs_write_file()Li Guifu
Introduce write_uncompressed_file_from_fd() to make error handling path in erofs_write_file() clearer. Link: https://lore.kernel.org/r/20191219181901.GA9405@hsiangkao-HP-ZHAN-66-Pro-G1 Signed-off-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-11-22erofs-utils: fix configure.acHaruue Icymoon
./configure will fail when --with-lz4-libdir is not set, since $with_lz4_libdir will be an empty string and generate an empty -L into LDFLAGS. This patch fixes it. Link: https://lore.kernel.org/r/20191122085859.GA2414688@usamimi.host.haruue.net Signed-off-by: Haruue Icymoon <i@haruue.moe> Fixes: d51c2d043773 ("erofs-utils: introduce lz4/lz4hc compression algorithm") Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-11-16erofs-utils: set up all compiler/linker variables independentlyGao Xiang
Otherwise, the following checking will be effected and it can cause unexpected behavior on configuring. Founded by the upcoming XZ algorithm patches. Link: https://lore.kernel.org/r/20191114134521.12416-1-hsiangkao@aol.com Reviewed-and-tested-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-11-14erofs-utils: complete missing memory handlingLi Guifu
Memory allocation failure should be handled properly in principle. Link: https://lore.kernel.org/r/20191114091914.6789-1-hsiangkao@aol.com Signed-off-by: Li Guifu <bluce.liguifu@huawei.com> [ Gao Xiang: due to Huawei outgoing email limitation, I have to help Guifu send out his patches at work. ] Signed-off-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-11-14erofs-utils: support 128-bit filesystem UUIDGao Xiang
Complete filesystem UUID feature on userspace side. Link: https://lore.kernel.org/r/20191113060141.9502-1-hsiangkao@aol.com Cc: Chao Yu <yuchao0@huawei.com> Reviewed-and-tested-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-11-08erofs-utils: support calculating checksum of superblockPratik Shinde
Added code for calculating crc of superblock. Note that the first 1024 bytes are not checksummed to allow for the installation of x86 boot sectors and other oddities. Fill 'feature_compat' field of erofs_super_block so that it can be used on kernel side. also fixing one typo. Link: https://lore.kernel.org/r/20191107040327.93369-1-gaoxiang25@huawei.com Signed-off-by: Pratik Shinde <pratikshinde320@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-11-05erofs-utils: add manual for mkfs.erofsGao Xiang
This patch adds mkfs.erofs manpage, which is a requirement of a debian binary package (See Debian Policy Manual section 12.1 [1].) [1] https://www.debian.org/doc/debian-policy/ch-docs.html#manual-pages Link: https://lore.kernel.org/r/20191104072817.7936-1-hsiangkao@aol.com Reviewed-and-tested-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-24erofs-utils: release 1.0Gao Xiang
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-24erofs-utils: document more known matters to READMEGao Xiang
We are about to release erofs-utils 1.0, add more words to README on known fixed issues about lz4 upstream library. Link: https://lore.kernel.org/r/20191023092031.211186-1-gaoxiang25@huawei.com Cc: Chao Yu <yuchao0@huawei.com> Cc: Yann Collet <yann.collet.73@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-23erofs-utils: simplify prints in usage()Gao Xiang
Use a single puts instead, trivial update. Link: https://lore.kernel.org/r/20191023063718.152278-1-gaoxiang25@huawei.com Suggested-by: Li Guifu <bluce.liguifu@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-23erofs-utils: list available compressors for help commandGao Xiang
Users can get knowledge of supported compression algorithms then. Link: https://lore.kernel.org/r/20191022185947.12326-1-hsiangkao@aol.com Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-23erofs-utils: introduce long parameter optionLi Guifu
Only long option "--help" is valid now. Link: https://lore.kernel.org/r/20191022172518.9020-1-hsiangkao@aol.com Signed-off-by: Li Guifu <blucerlee@gmail.com> Tested-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-15erofs-utils: introduce shared xattr supportLi Guifu
Large xattrs or xattrs shared by a lot of files can be stored in shared xattrs rather than inlined right after inode. Link: https://lore.kernel.org/r/20191014235308.4277-1-hsiangkao@aol.com Signed-off-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-15erofs-utils: introduce inline xattr supporthtyuxe+dhbrei4sq0df8@grr.la
Load xattrs from source files and pack them into target image. Link: https://lore.kernel.org/r/20191014114206.590-1-hsiangkao@aol.com Signed-off-by: htyuxe+dhbrei4sq0df8@grr.la <htyuxe+dhbrei4sq0df8@grr.la> Signed-off-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-15erofs-utils: use cmpsgn(x, y) for standardized large value comparsionGao Xiang
Previously, roundup(bb->buffers.off % EROFS_BLKSIZ, alignsize) + incr + extrasize is an unsigned 64bit value and sgn(x) didn't work properly. Fix it. Link: https://lore.kernel.org/r/20191015155025.13215-1-hsiangkao@aol.com Fixes: b0ca535297b6 ("erofs-utils: support 64-bit internal buffer cache") Reviewed-and-tested-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-13erofs-utils: fix old kernel compatibility for non-lz4 compressionGao Xiang
If primary algorithm is not lz4 (e.g. compression off), clear EROFS_FEATURE_INCOMPAT_LZ4_0PADDING for old kernel (upstream kernel <= 5.2.y) compatibility. Link: https://lore.kernel.org/r/20191012024345.181737-1-gaoxiang25@huawei.com Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-10-12erofs-utils: fix error handler notes when parameter missLi Guifu
If a parameter isnot input, mkfs's error handler cannot give a correct notes, fix it. Link: https://lore.kernel.org/r/20191011170953.6267-2-blucerlee@gmail.com Signed-off-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-12erofs-utils: introduce fixed UNIX timestampLi Guifu
Introduce option "-T" for UNIX timestamp. Link: https://lore.kernel.org/r/20191012001847.GA5701@hsiangkao-HP-ZHAN-66-Pro-G1 Signed-off-by: Li Guifu <blucerlee@gmail.com> [ Gao Xiang: use u64 for timestamp rather than long long. ] Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-10-07erofs-utils: complete extended inode supportGao Xiang
There is no requirement to use extended inode (v2) for Android, but it's obviously useful for wider use cases. extended inode was partially supported by obsoleted_mkfs, complete for new erofs-utils as well. Reviewed-by: Li Guifu <blucerlee@gmail.com> Tested-by: Li Guifu <blucerlee@gmail.com> Link: https://lore.kernel.org/r/20191004204630.22696-2-hsiangkao@aol.com Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-10-06erofs-utils: support 64-bit internal buffer cacheGao Xiang
Previously, the type of off in struct erofs_buffer_head is unsigned int, it's not enough for large files. Fix to a 64-bit field in order to support large files. Reviewed-by: Li Guifu <blucerlee@gmail.com> Tested-by: Li Guifu <blucerlee@gmail.com> Link: https://lore.kernel.org/r/20191004204630.22696-1-hsiangkao@aol.com Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-09-18erofs-utils: keep up with in-kernel ondisk format namingGao Xiang
This patch adapts erofs-utils to the latest kernel ondisk definitions, especially the following kernel commits: 4b66eb51d2c4 erofs: remove all the byte offset comments 60a49ba8fee1 erofs: on-disk format should have explicitly assigned numbers b6796abd3cc1 erofs: some macros are much more readable as a function ed34aa4a8a7d erofs: kill __packed for on-disk structures c39747f770be erofs: update erofs_inode_is_data_compressed helper 426a930891cf erofs: use feature_incompat rather than requirements 8a76568225de erofs: better naming for erofs inode related stuffs ea559e7b8451 erofs: update erofs_fs.h comments Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-09-17erofs-utils: resize image to the correct sizeGao Xiang
In the end, it's necessary to resize image to the proper size since buffers could be dropped. Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-09-17erofs-utils: complete special file supportGao Xiang
Special file was already supported by obsoleted_mkfs, let's complete it for new erofs-utils now. Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2019-09-09erofs-utils: build: cure compiler warningsJan Engelhardt
On i586 I observe: In file included from inode.c:16: inode.c: In function 'erofs_mkfs_build_tree': ../include/erofs/print.h:27:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'erofs_nid_t' {aka 'long long unsigned int'} [-Werror=format=] 27 | #define pr_fmt(fmt) "EROFS: " FUNC_LINE_FMT fmt "\n" ../include/erofs/print.h:43:4: note: in expansion of macro 'pr_fmt' 43 | pr_fmt(fmt), \ inode.c:792:3: note: in expansion of macro 'erofs_info' 792 | erofs_info("add file %s/%s (nid %lu, type %d)", inode.c:792:37: note: format string is defined here 792 | erofs_info("add file %s/%s (nid %lu, type %d)", Signed-off-by: Jan Engelhardt <jengelh@inai.de> [ Gao Xiang: minor update, and fix subject line. ] Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-08-26erofs-utils: fix up "-E legacy-compress"Gao Xiang
"-E legacy-compress" isn't parsed properly, fix it now. Reported-by: Li Guifu <blucerlee@gmail.com> Fixes: 1f11cf0463b5 ("erofs-utils: introduce extented options setting") Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-08-26erofs-utils: fix a memory leak of compressmetaGao Xiang
compressmeta should be freed after successfully written. Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
2019-08-17erofs-utils: fail the image creation when source path is not a directory filePratik Shinde
In the erofs.mkfs utility, if the source path is not a directory,image creation should not proceed.since root of the filesystem needs to be a directory. moving the check to main function. Signed-off-by: Pratik Shinde <pratikshinde320@gmail.com> Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>