the source code generated in output

Signed-off-by: 周才杰 <cjzhou97@gmail.com>
This commit is contained in:
周才杰
2025-05-08 10:35:45 +08:00
parent f2a23ac678
commit 046e457474
4 changed files with 584 additions and 304 deletions
+530 -249
View File
@@ -2,6 +2,276 @@ import("//build/ohos.gni")
import("//build/ohos_var.gni")
import("e2fsprogs.gni")
action("e2fsprogs_action") {
script = "//third_party/e2fsprogs/install.sh"
inputs = [
"//third_party/e2fsprogs/e2fsprogs.tar.xz",
"//third_party/e2fsprogs/0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch",
"//third_party/e2fsprogs/0002-libss-add-newer-libreadline.so.8-to-dlopen-path.patch",
"//third_party/e2fsprogs/0003-tests-update-expect-files-for-f_mmp_garbage.patch",
"//third_party/e2fsprogs/0004-tests-update-expect-files-for-f_large_dir-and-f_larg.patch",
"//third_party/e2fsprogs/0005-resize2fs-resize2fs-disk-hardlinks-will-be-error.patch",
"//third_party/e2fsprogs/0006-e2fsck-exit-journal-recovery-when-find-EIO-ENOMEM-er.patch",
"//third_party/e2fsprogs/0007-e2fsck-exit-journal-recovery-when-jounral-superblock.patch",
"//third_party/e2fsprogs/0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch",
"//third_party/e2fsprogs/0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch",
"//third_party/e2fsprogs/0010-tests-update-expect-file-for-u_direct_io.patch",
"//third_party/e2fsprogs/0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch",
"//third_party/e2fsprogs/0012-tests-fix-ACL-printing-tests.patch",
"//third_party/e2fsprogs/0013-e2fsck-do-not-clean-up-file-acl-if-the-inode-is-trun.patch",
"//third_party/e2fsprogs/0014-e2fsck-handle-level-is-overflow-in-ext2fs_extent_get.patch",
"//third_party/e2fsprogs/0015-libext2fs-add-sanity-check-to-extent-manipulation.patch",
"//third_party/e2fsprogs/0016-e2fsprogs-add-sw64.patch",
"//third_party/e2fsprogs/0017-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch",
"//third_party/e2fsprogs/0018-debugfs-teach-logdump-the-n-num_trans-option.patch",
"//third_party/e2fsprogs/0019-tune2fs-fix-tune2fs-segfault-when-ext2fs_run_ext3_jo.patch",
"//third_party/e2fsprogs/0020-tune2fs-tune2fs_main-should-return-rc-when-some-erro.patch",
"//third_party/e2fsprogs/0021-tune2fs-exit-directly-when-fs-freed-in-ext2fs_run_ext3_journal.patch",
"//third_party/e2fsprogs/0022-unix_io.c-fix-deadlock-problem-in-unix_write_blk64.patch",
"//third_party/e2fsprogs/0023-debugfs-fix-repeated-output-problem-with-logdump-O-n.patch",
"//third_party/e2fsprogs/0024-tune2fs-check-return-value-of-ext2fs_mmp_update2-in-.patch",
"//third_party/e2fsprogs/0025-mmp-fix-wrong-comparison-in-ext2fs_mmp_stop.patch",
"//third_party/e2fsprogs/0026-misc-fsck.c-Processes-may-kill-other-processes.patch",
"//third_party/e2fsprogs/0027-dumpe2fs-resize2fs-avoid-memory-leak-on-error-path.patch",
"//third_party/e2fsprogs/0028-libext2fs-fix-memory-leak-in-error-path-while-openin.patch",
"//third_party/e2fsprogs/0029-e2fsck-avoid-theoretical-null-dereference-in-end_pro.patch",
"//third_party/e2fsprogs/0030-e2fsck-fix-potential-out-of-bounds-read-in-inc_ea_in.patch",
"//third_party/e2fsprogs/0031-e2fsck-avoid-out-of-bounds-write-for-very-deep-exten.patch",
"//third_party/e2fsprogs/0032-e2fsck-fix-potential-fencepost-error-in-e2fsck_shoul.patch",
"//third_party/e2fsprogs/0033-libext2fs-fix-potential-integer-overflow-in-bitmap-a.patch",
"//third_party/e2fsprogs/0034-tune2fs-fix-an-error-message.patch",
"//third_party/e2fsprogs/0035-e2fsck-don-t-allow-journal-inode-to-have-encrypt-fla.patch",
"//third_party/e2fsprogs/0036-lib-ext2fs-fix-unbalanced-mutex-unlock-for-BOUNCE_MT.patch",
"//third_party/e2fsprogs/0037-libext2fs-fix-ext2fs_compare_generic_bmap-logic.patch",
"//third_party/e2fsprogs/0038-Quiet-unused-variable-warnings.patch",
"//third_party/e2fsprogs/0039-ext2fs-Use-64bit-lseek-when-_FILE_OFFSET_BITS-is-64.patch",
"//third_party/e2fsprogs/0040-e2fsck-fix-bad-htree-checksums-in-preen-mode.patch",
"//third_party/e2fsprogs/0041-debugfs-Fix-infinite-loop-when-dump-log.patch",
"//third_party/e2fsprogs/1001-image-make.patch",
"//third_party/e2fsprogs/1002-add-header-file-to-musl-compile-mk2efs.patch",
"//third_party/e2fsprogs/1003-add-dac-config.patch",
"//third_party/e2fsprogs/1004-modify-code-to-compile.patch",
"//third_party/e2fsprogs/1005-read-vfat-chinese-label.patch",
"//third_party/e2fsprogs/1006-add-hmfs-for-blkid.patch"
]
outputs = [
"${target_gen_dir}/e2fsprogs",
"${target_gen_dir}/e2fsprogs/contrib/android/dac_config.cpp",
"${target_gen_dir}/e2fsprogs/contrib/android/base_fs.c",
"${target_gen_dir}/e2fsprogs/contrib/android/basefs_allocator.c",
"${target_gen_dir}/e2fsprogs/contrib/android/block_list.c",
"${target_gen_dir}/e2fsprogs/contrib/android/block_range.c",
"${target_gen_dir}/e2fsprogs/contrib/android/e2fsdroid.c",
"${target_gen_dir}/e2fsprogs/contrib/android/fsmap.c",
"${target_gen_dir}/e2fsprogs/contrib/android/perms.c",
"${target_gen_dir}/e2fsprogs/e2fsck/badblocks.c",
"${target_gen_dir}/e2fsprogs/e2fsck/dirinfo.c",
"${target_gen_dir}/e2fsprogs/e2fsck/dx_dirinfo.c",
"${target_gen_dir}/e2fsprogs/e2fsck/e2fsck.c",
"${target_gen_dir}/e2fsprogs/e2fsck/ea_refcount.c",
"${target_gen_dir}/e2fsprogs/e2fsck/ehandler.c",
"${target_gen_dir}/e2fsprogs/e2fsck/encrypted_files.c",
"${target_gen_dir}/e2fsprogs/e2fsck/extents.c",
"${target_gen_dir}/e2fsprogs/e2fsck/journal.c",
"${target_gen_dir}/e2fsprogs/e2fsck/logfile.c",
"${target_gen_dir}/e2fsprogs/e2fsck/message.c",
"${target_gen_dir}/e2fsprogs/e2fsck/pass1.c",
"${target_gen_dir}/e2fsprogs/e2fsck/pass1b.c",
"${target_gen_dir}/e2fsprogs/e2fsck/pass2.c",
"${target_gen_dir}/e2fsprogs/e2fsck/pass3.c",
"${target_gen_dir}/e2fsprogs/e2fsck/pass4.c",
"${target_gen_dir}/e2fsprogs/e2fsck/pass5.c",
"${target_gen_dir}/e2fsprogs/e2fsck/problem.c",
"${target_gen_dir}/e2fsprogs/e2fsck/quota.c",
"${target_gen_dir}/e2fsprogs/e2fsck/readahead.c",
"${target_gen_dir}/e2fsprogs/e2fsck/recovery.c",
"${target_gen_dir}/e2fsprogs/e2fsck/region.c",
"${target_gen_dir}/e2fsprogs/e2fsck/rehash.c",
"${target_gen_dir}/e2fsprogs/e2fsck/revoke.c",
"${target_gen_dir}/e2fsprogs/e2fsck/sigcatcher.c",
"${target_gen_dir}/e2fsprogs/e2fsck/super.c",
"${target_gen_dir}/e2fsprogs/e2fsck/unix.c",
"${target_gen_dir}/e2fsprogs/e2fsck/util.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/cache.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/dev.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/devname.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/devno.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/getsize.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/llseek.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/probe.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/read.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/resolve.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/save.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/tag.c",
"${target_gen_dir}/e2fsprogs/lib/blkid/version.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/encoding.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/errcode.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/feature.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/fgetflags.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/fgetproject.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/fgetversion.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/fsetflags.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/fsetproject.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/fsetversion.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/getflags.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/getversion.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/hashstr.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/iod.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/ljs.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/ls.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/mntopts.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/ostype.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/parse_num.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/pe.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/percent.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/pf.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/ps.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/setflags.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/setversion.c",
"${target_gen_dir}/e2fsprogs/lib/e2p/uuid.c",
"${target_gen_dir}/e2fsprogs/lib/et/com_err.c",
"${target_gen_dir}/e2fsprogs/lib/et/com_right.c",
"${target_gen_dir}/e2fsprogs/lib/et/error_message.c",
"${target_gen_dir}/e2fsprogs/lib/et/et_name.c",
"${target_gen_dir}/e2fsprogs/lib/et/init_et.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/alloc.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/alloc_sb.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/alloc_stats.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/alloc_tables.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/atexit.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/badblocks.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/bb_inode.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/bitmaps.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/bitops.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/blkmap64_ba.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/blkmap64_rb.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/blknum.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/block.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/bmap.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/check_desc.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/closefs.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/crc16.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/crc32c.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/csum.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/dblist.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/dblist_dir.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/digest_encode.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/dir_iterate.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/dirblock.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/dirhash.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/dupfs.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/expanddir.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/ext2_err.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/ext_attr.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/extent.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/fallocate.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/fileio.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/finddev.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/flushb.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/freefs.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/gen_bitmap.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/gen_bitmap64.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/get_num_dirs.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/get_pathname.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/getsectsize.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/getsize.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/hashmap.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/i_block.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/icount.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/imager.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/ind_block.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/initialize.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/inline.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/inline_data.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/inode.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/io_manager.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/ismounted.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/link.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/llseek.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/lookup.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/mkdir.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/mkjournal.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/mmp.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/namei.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/native.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/newdir.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/nls_utf8.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/openfs.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/progress.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/punch.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/qcow2.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/rbtree.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/read_bb.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/read_bb_file.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/res_gdt.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/rw_bitmaps.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/sha256.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/sha512.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/sparse_io.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/swapfs.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/symlink.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/test_io.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/undo_io.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/unix_io.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/unlink.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/valid_blk.c",
"${target_gen_dir}/e2fsprogs/lib/ext2fs/version.c",
"${target_gen_dir}/e2fsprogs/lib/ss/data.c",
"${target_gen_dir}/e2fsprogs/lib/ss/error.c",
"${target_gen_dir}/e2fsprogs/lib/ss/execute_cmd.c",
"${target_gen_dir}/e2fsprogs/lib/ss/get_readline.c",
"${target_gen_dir}/e2fsprogs/lib/ss/help.c",
"${target_gen_dir}/e2fsprogs/lib/ss/invocation.c",
"${target_gen_dir}/e2fsprogs/lib/ss/list_rqs.c",
"${target_gen_dir}/e2fsprogs/lib/ss/listen.c",
"${target_gen_dir}/e2fsprogs/lib/ss/pager.c",
"${target_gen_dir}/e2fsprogs/lib/ss/parse.c",
"${target_gen_dir}/e2fsprogs/lib/ss/prompt.c",
"${target_gen_dir}/e2fsprogs/lib/ss/request_tbl.c",
"${target_gen_dir}/e2fsprogs/lib/ss/requests.c",
"${target_gen_dir}/e2fsprogs/lib/ss/ss_err.c",
"${target_gen_dir}/e2fsprogs/lib/ss/std_rqs.c",
"${target_gen_dir}/e2fsprogs/lib/support/dict.c",
"${target_gen_dir}/e2fsprogs/lib/support/mkquota.c",
"${target_gen_dir}/e2fsprogs/lib/support/parse_qtype.c",
"${target_gen_dir}/e2fsprogs/lib/support/plausible.c",
"${target_gen_dir}/e2fsprogs/lib/support/prof_err.c",
"${target_gen_dir}/e2fsprogs/lib/support/profile_helpers.c",
"${target_gen_dir}/e2fsprogs/lib/support/quotaio.c",
"${target_gen_dir}/e2fsprogs/lib/support/quotaio_tree.c",
"${target_gen_dir}/e2fsprogs/lib/support/quotaio_v2.c",
"${target_gen_dir}/e2fsprogs/lib/support/profile.c",
"${target_gen_dir}/e2fsprogs/lib/support/cstring.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/clear.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/compare.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/copy.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/gen_uuid.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/isnull.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/pack.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/parse.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/unpack.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/unparse.c",
"${target_gen_dir}/e2fsprogs/lib/uuid/uuid_time.c",
"${target_gen_dir}/e2fsprogs/misc/create_inode.c",
"${target_gen_dir}/e2fsprogs/misc/default_profile.c",
"${target_gen_dir}/e2fsprogs/misc/mk_hugefiles.c",
"${target_gen_dir}/e2fsprogs/misc/mke2fs.c",
"${target_gen_dir}/e2fsprogs/misc/util.c",
"${target_gen_dir}/e2fsprogs/misc/blkid.c",
"${target_gen_dir}/e2fsprogs/resize/extent.c",
"${target_gen_dir}/e2fsprogs/resize/main.c",
"${target_gen_dir}/e2fsprogs/resize/online.c",
"${target_gen_dir}/e2fsprogs/resize/resize2fs.c",
"${target_gen_dir}/e2fsprogs/resize/resource_track.c",
"${target_gen_dir}/e2fsprogs/resize/sim_progress.c",
]
e2fsprogs_src_path = rebase_path("//third_party/e2fsprogs")
e2fsprogs_gen_path = rebase_path("${target_gen_dir}", root_build_dir)
args = ["$e2fsprogs_gen_path", "$e2fsprogs_src_path"]
}
E2FSPROGS_DIR = rebase_path("${target_gen_dir}/e2fsprogs")
group("e2fsprogs") {
deps = [
":blkid",
@@ -30,8 +300,8 @@ group("e2fsprogs_host_toolchain") {
ohos_static_library("libdacconfig") {
output_name = "libdacconfig"
sources = [ "e2fsprogs/contrib/android/dac_config.cpp" ]
sources = [ "${E2FSPROGS_DIR}/contrib/android/dac_config.cpp" ]
deps = [":e2fsprogs_action",]
part_name = "e2fsprogs"
subsystem_name = "thirdparty"
}
@@ -43,7 +313,7 @@ config("e2fsdroid-defaults") {
}
config("e2fsdroid_libext2_uuid") {
include_dirs = [ "e2fsprogs/lib/uuid/" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/uuid/", "${E2FSPROGS_DIR}/lib/"]
}
######################################################
@@ -53,20 +323,20 @@ ohos_executable("e2fsdroid") {
defines = [ "HAVE_SYS_TYPES_H" ]
sources = [
"e2fsprogs/contrib/android/base_fs.c",
"e2fsprogs/contrib/android/basefs_allocator.c",
"e2fsprogs/contrib/android/block_list.c",
"e2fsprogs/contrib/android/block_range.c",
"e2fsprogs/contrib/android/e2fsdroid.c",
"e2fsprogs/contrib/android/fsmap.c",
"e2fsprogs/contrib/android/perms.c",
"${E2FSPROGS_DIR}/contrib/android/base_fs.c",
"${E2FSPROGS_DIR}/contrib/android/basefs_allocator.c",
"${E2FSPROGS_DIR}/contrib/android/block_list.c",
"${E2FSPROGS_DIR}/contrib/android/block_range.c",
"${E2FSPROGS_DIR}/contrib/android/e2fsdroid.c",
"${E2FSPROGS_DIR}/contrib/android/fsmap.c",
"${E2FSPROGS_DIR}/contrib/android/perms.c",
]
include_dirs = [
"//third_party/e2fsprogs/e2fsprogs/contrib/android/",
"//third_party/e2fsprogs/e2fsprogs/lib",
"//third_party/e2fsprogs/e2fsprogs/lib/ext2fs",
"//third_party/e2fsprogs/e2fsprogs/misc",
"${E2FSPROGS_DIR}/contrib/android/",
"${E2FSPROGS_DIR}/lib",
"${E2FSPROGS_DIR}/lib/ext2fs",
"${E2FSPROGS_DIR}/misc",
]
deps = [
@@ -74,6 +344,7 @@ ohos_executable("e2fsdroid") {
":libext2_com_err",
":libext2_misc",
":libext2fs",
":e2fsprogs_action"
]
external_deps = [ "selinux:libselinux" ]
@@ -100,40 +371,40 @@ config("e2fsck-defaults") {
ohos_executable("e2fsck") {
configs = [ ":e2fsck-defaults" ]
sources = [
"e2fsprogs/e2fsck/badblocks.c",
"e2fsprogs/e2fsck/dirinfo.c",
"e2fsprogs/e2fsck/dx_dirinfo.c",
"e2fsprogs/e2fsck/e2fsck.c",
"e2fsprogs/e2fsck/ea_refcount.c",
"e2fsprogs/e2fsck/ehandler.c",
"e2fsprogs/e2fsck/encrypted_files.c",
"e2fsprogs/e2fsck/extents.c",
"e2fsprogs/e2fsck/journal.c",
"e2fsprogs/e2fsck/logfile.c",
"e2fsprogs/e2fsck/message.c",
"e2fsprogs/e2fsck/pass1.c",
"e2fsprogs/e2fsck/pass1b.c",
"e2fsprogs/e2fsck/pass2.c",
"e2fsprogs/e2fsck/pass3.c",
"e2fsprogs/e2fsck/pass4.c",
"e2fsprogs/e2fsck/pass5.c",
"e2fsprogs/e2fsck/problem.c",
"e2fsprogs/e2fsck/quota.c",
"e2fsprogs/e2fsck/readahead.c",
"e2fsprogs/e2fsck/recovery.c",
"e2fsprogs/e2fsck/region.c",
"e2fsprogs/e2fsck/rehash.c",
"e2fsprogs/e2fsck/revoke.c",
"e2fsprogs/e2fsck/sigcatcher.c",
"e2fsprogs/e2fsck/super.c",
"e2fsprogs/e2fsck/unix.c",
"e2fsprogs/e2fsck/util.c",
"${E2FSPROGS_DIR}/e2fsck/badblocks.c",
"${E2FSPROGS_DIR}/e2fsck/dirinfo.c",
"${E2FSPROGS_DIR}/e2fsck/dx_dirinfo.c",
"${E2FSPROGS_DIR}/e2fsck/e2fsck.c",
"${E2FSPROGS_DIR}/e2fsck/ea_refcount.c",
"${E2FSPROGS_DIR}/e2fsck/ehandler.c",
"${E2FSPROGS_DIR}/e2fsck/encrypted_files.c",
"${E2FSPROGS_DIR}/e2fsck/extents.c",
"${E2FSPROGS_DIR}/e2fsck/journal.c",
"${E2FSPROGS_DIR}/e2fsck/logfile.c",
"${E2FSPROGS_DIR}/e2fsck/message.c",
"${E2FSPROGS_DIR}/e2fsck/pass1.c",
"${E2FSPROGS_DIR}/e2fsck/pass1b.c",
"${E2FSPROGS_DIR}/e2fsck/pass2.c",
"${E2FSPROGS_DIR}/e2fsck/pass3.c",
"${E2FSPROGS_DIR}/e2fsck/pass4.c",
"${E2FSPROGS_DIR}/e2fsck/pass5.c",
"${E2FSPROGS_DIR}/e2fsck/problem.c",
"${E2FSPROGS_DIR}/e2fsck/quota.c",
"${E2FSPROGS_DIR}/e2fsck/readahead.c",
"${E2FSPROGS_DIR}/e2fsck/recovery.c",
"${E2FSPROGS_DIR}/e2fsck/region.c",
"${E2FSPROGS_DIR}/e2fsck/rehash.c",
"${E2FSPROGS_DIR}/e2fsck/revoke.c",
"${E2FSPROGS_DIR}/e2fsck/sigcatcher.c",
"${E2FSPROGS_DIR}/e2fsck/super.c",
"${E2FSPROGS_DIR}/e2fsck/unix.c",
"${E2FSPROGS_DIR}/e2fsck/util.c",
]
include_dirs = [
"//third_party/e2fsprogs/e2fsprogs/e2fsck",
"//third_party/e2fsprogs/e2fsprogs/lib",
"//third_party/e2fsprogs/e2fsprogs/lib/ext2fs",
"${E2FSPROGS_DIR}/e2fsck",
"${E2FSPROGS_DIR}/lib",
"${E2FSPROGS_DIR}/lib/ext2fs",
]
deps = [
@@ -143,6 +414,7 @@ ohos_executable("e2fsck") {
":libext2_quota",
":libext2_uuid",
":libext2fs",
":e2fsprogs_action"
]
install_enable = true
@@ -157,7 +429,7 @@ ohos_executable("e2fsck") {
###################################################
###Build libext2_blkid
config("libext2-headers") {
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib" ]
}
config("libext2_blkid-defaults") {
@@ -169,7 +441,7 @@ config("libext2_blkid-defaults") {
}
config("libext2_blkid_public_config") {
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib" ]
}
ohos_shared_library("libext2_blkid") {
@@ -179,22 +451,22 @@ ohos_shared_library("libext2_blkid") {
]
public_configs = [ ":libext2_blkid_public_config" ]
sources = [
"e2fsprogs/lib/blkid/cache.c",
"e2fsprogs/lib/blkid/dev.c",
"e2fsprogs/lib/blkid/devname.c",
"e2fsprogs/lib/blkid/devno.c",
"e2fsprogs/lib/blkid/getsize.c",
"e2fsprogs/lib/blkid/llseek.c",
"e2fsprogs/lib/blkid/probe.c",
"e2fsprogs/lib/blkid/read.c",
"e2fsprogs/lib/blkid/resolve.c",
"e2fsprogs/lib/blkid/save.c",
"e2fsprogs/lib/blkid/tag.c",
"e2fsprogs/lib/blkid/version.c",
"${E2FSPROGS_DIR}/lib/blkid/cache.c",
"${E2FSPROGS_DIR}/lib/blkid/dev.c",
"${E2FSPROGS_DIR}/lib/blkid/devname.c",
"${E2FSPROGS_DIR}/lib/blkid/devno.c",
"${E2FSPROGS_DIR}/lib/blkid/getsize.c",
"${E2FSPROGS_DIR}/lib/blkid/llseek.c",
"${E2FSPROGS_DIR}/lib/blkid/probe.c",
"${E2FSPROGS_DIR}/lib/blkid/read.c",
"${E2FSPROGS_DIR}/lib/blkid/resolve.c",
"${E2FSPROGS_DIR}/lib/blkid/save.c",
"${E2FSPROGS_DIR}/lib/blkid/tag.c",
"${E2FSPROGS_DIR}/lib/blkid/version.c",
]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/blkid" ]
deps = [ ":libext2_uuid" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/blkid" ]
deps = [ ":libext2_uuid", ":e2fsprogs_action" ]
cflags = [
"-Wno-error=attributes",
"-Wno-error=pointer-sign",
@@ -221,33 +493,33 @@ config("libext2_e2p-defaults") {
ohos_shared_library("libext2_e2p") {
sources = [
"e2fsprogs/lib/e2p/encoding.c",
"e2fsprogs/lib/e2p/errcode.c",
"e2fsprogs/lib/e2p/feature.c",
"e2fsprogs/lib/e2p/fgetflags.c",
"e2fsprogs/lib/e2p/fgetproject.c",
"e2fsprogs/lib/e2p/fgetversion.c",
"e2fsprogs/lib/e2p/fsetflags.c",
"e2fsprogs/lib/e2p/fsetproject.c",
"e2fsprogs/lib/e2p/fsetversion.c",
"e2fsprogs/lib/e2p/getflags.c",
"e2fsprogs/lib/e2p/getversion.c",
"e2fsprogs/lib/e2p/hashstr.c",
"e2fsprogs/lib/e2p/iod.c",
"e2fsprogs/lib/e2p/ljs.c",
"e2fsprogs/lib/e2p/ls.c",
"e2fsprogs/lib/e2p/mntopts.c",
"e2fsprogs/lib/e2p/ostype.c",
"e2fsprogs/lib/e2p/parse_num.c",
"e2fsprogs/lib/e2p/pe.c",
"e2fsprogs/lib/e2p/percent.c",
"e2fsprogs/lib/e2p/pf.c",
"e2fsprogs/lib/e2p/ps.c",
"e2fsprogs/lib/e2p/setflags.c",
"e2fsprogs/lib/e2p/setversion.c",
"e2fsprogs/lib/e2p/uuid.c",
"${E2FSPROGS_DIR}/lib/e2p/encoding.c",
"${E2FSPROGS_DIR}/lib/e2p/errcode.c",
"${E2FSPROGS_DIR}/lib/e2p/feature.c",
"${E2FSPROGS_DIR}/lib/e2p/fgetflags.c",
"${E2FSPROGS_DIR}/lib/e2p/fgetproject.c",
"${E2FSPROGS_DIR}/lib/e2p/fgetversion.c",
"${E2FSPROGS_DIR}/lib/e2p/fsetflags.c",
"${E2FSPROGS_DIR}/lib/e2p/fsetproject.c",
"${E2FSPROGS_DIR}/lib/e2p/fsetversion.c",
"${E2FSPROGS_DIR}/lib/e2p/getflags.c",
"${E2FSPROGS_DIR}/lib/e2p/getversion.c",
"${E2FSPROGS_DIR}/lib/e2p/hashstr.c",
"${E2FSPROGS_DIR}/lib/e2p/iod.c",
"${E2FSPROGS_DIR}/lib/e2p/ljs.c",
"${E2FSPROGS_DIR}/lib/e2p/ls.c",
"${E2FSPROGS_DIR}/lib/e2p/mntopts.c",
"${E2FSPROGS_DIR}/lib/e2p/ostype.c",
"${E2FSPROGS_DIR}/lib/e2p/parse_num.c",
"${E2FSPROGS_DIR}/lib/e2p/pe.c",
"${E2FSPROGS_DIR}/lib/e2p/percent.c",
"${E2FSPROGS_DIR}/lib/e2p/pf.c",
"${E2FSPROGS_DIR}/lib/e2p/ps.c",
"${E2FSPROGS_DIR}/lib/e2p/setflags.c",
"${E2FSPROGS_DIR}/lib/e2p/setversion.c",
"${E2FSPROGS_DIR}/lib/e2p/uuid.c",
]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/e2p" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/e2p" ]
configs = [
":libext2_e2p-defaults",
@@ -257,6 +529,7 @@ ohos_shared_library("libext2_e2p") {
"-Wno-error=attributes",
"-Wno-unused-parameter",
]
deps = [":e2fsprogs_action"]
install_enable = true
subsystem_name = "thirdparty"
part_name = "e2fsprogs"
@@ -278,18 +551,19 @@ config("libext2_com_err-defaults") {
ohos_shared_library("libext2_com_err") {
sources = [
"e2fsprogs/lib/et/com_err.c",
"e2fsprogs/lib/et/com_right.c",
"e2fsprogs/lib/et/error_message.c",
"e2fsprogs/lib/et/et_name.c",
"e2fsprogs/lib/et/init_et.c",
"${E2FSPROGS_DIR}/lib/et/com_err.c",
"${E2FSPROGS_DIR}/lib/et/com_right.c",
"${E2FSPROGS_DIR}/lib/et/error_message.c",
"${E2FSPROGS_DIR}/lib/et/et_name.c",
"${E2FSPROGS_DIR}/lib/et/init_et.c",
]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/et" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/et" ]
configs = [
":libext2_com_err-defaults",
":libext2-headers",
]
deps = [":e2fsprogs_action"]
install_enable = true
subsystem_name = "thirdparty"
part_name = "e2fsprogs"
@@ -313,97 +587,97 @@ config("libext2fs-defaults") {
ohos_shared_library("libext2fs") {
sources = [
"e2fsprogs/lib/ext2fs/alloc.c",
"e2fsprogs/lib/ext2fs/alloc_sb.c",
"e2fsprogs/lib/ext2fs/alloc_stats.c",
"e2fsprogs/lib/ext2fs/alloc_tables.c",
"e2fsprogs/lib/ext2fs/atexit.c",
"e2fsprogs/lib/ext2fs/badblocks.c",
"e2fsprogs/lib/ext2fs/bb_inode.c",
"e2fsprogs/lib/ext2fs/bitmaps.c",
"e2fsprogs/lib/ext2fs/bitops.c",
"e2fsprogs/lib/ext2fs/blkmap64_ba.c",
"e2fsprogs/lib/ext2fs/blkmap64_rb.c",
"e2fsprogs/lib/ext2fs/blknum.c",
"e2fsprogs/lib/ext2fs/block.c",
"e2fsprogs/lib/ext2fs/bmap.c",
"e2fsprogs/lib/ext2fs/check_desc.c",
"e2fsprogs/lib/ext2fs/closefs.c",
"e2fsprogs/lib/ext2fs/crc16.c",
"e2fsprogs/lib/ext2fs/crc32c.c",
"e2fsprogs/lib/ext2fs/csum.c",
"e2fsprogs/lib/ext2fs/dblist.c",
"e2fsprogs/lib/ext2fs/dblist_dir.c",
"e2fsprogs/lib/ext2fs/digest_encode.c",
"e2fsprogs/lib/ext2fs/dir_iterate.c",
"e2fsprogs/lib/ext2fs/dirblock.c",
"e2fsprogs/lib/ext2fs/dirhash.c",
"e2fsprogs/lib/ext2fs/dupfs.c",
"e2fsprogs/lib/ext2fs/expanddir.c",
"e2fsprogs/lib/ext2fs/ext2_err.c",
"e2fsprogs/lib/ext2fs/ext_attr.c",
"e2fsprogs/lib/ext2fs/extent.c",
"e2fsprogs/lib/ext2fs/fallocate.c",
"e2fsprogs/lib/ext2fs/fileio.c",
"e2fsprogs/lib/ext2fs/finddev.c",
"e2fsprogs/lib/ext2fs/flushb.c",
"e2fsprogs/lib/ext2fs/freefs.c",
"e2fsprogs/lib/ext2fs/gen_bitmap.c",
"e2fsprogs/lib/ext2fs/gen_bitmap64.c",
"e2fsprogs/lib/ext2fs/get_num_dirs.c",
"e2fsprogs/lib/ext2fs/get_pathname.c",
"e2fsprogs/lib/ext2fs/getsectsize.c",
"e2fsprogs/lib/ext2fs/getsize.c",
"e2fsprogs/lib/ext2fs/hashmap.c",
"e2fsprogs/lib/ext2fs/i_block.c",
"e2fsprogs/lib/ext2fs/icount.c",
"e2fsprogs/lib/ext2fs/imager.c",
"e2fsprogs/lib/ext2fs/ind_block.c",
"e2fsprogs/lib/ext2fs/initialize.c",
"e2fsprogs/lib/ext2fs/inline.c",
"e2fsprogs/lib/ext2fs/inline_data.c",
"e2fsprogs/lib/ext2fs/inode.c",
"e2fsprogs/lib/ext2fs/io_manager.c",
"e2fsprogs/lib/ext2fs/ismounted.c",
"e2fsprogs/lib/ext2fs/link.c",
"e2fsprogs/lib/ext2fs/llseek.c",
"e2fsprogs/lib/ext2fs/lookup.c",
"e2fsprogs/lib/ext2fs/mkdir.c",
"e2fsprogs/lib/ext2fs/mkjournal.c",
"e2fsprogs/lib/ext2fs/mmp.c",
"e2fsprogs/lib/ext2fs/namei.c",
"e2fsprogs/lib/ext2fs/native.c",
"e2fsprogs/lib/ext2fs/newdir.c",
"e2fsprogs/lib/ext2fs/nls_utf8.c",
"e2fsprogs/lib/ext2fs/openfs.c",
"e2fsprogs/lib/ext2fs/progress.c",
"e2fsprogs/lib/ext2fs/punch.c",
"e2fsprogs/lib/ext2fs/qcow2.c",
"e2fsprogs/lib/ext2fs/rbtree.c",
"e2fsprogs/lib/ext2fs/read_bb.c",
"e2fsprogs/lib/ext2fs/read_bb_file.c",
"e2fsprogs/lib/ext2fs/res_gdt.c",
"e2fsprogs/lib/ext2fs/rw_bitmaps.c",
"e2fsprogs/lib/ext2fs/sha256.c",
"e2fsprogs/lib/ext2fs/sha512.c",
"e2fsprogs/lib/ext2fs/sparse_io.c",
"e2fsprogs/lib/ext2fs/swapfs.c",
"e2fsprogs/lib/ext2fs/symlink.c",
"e2fsprogs/lib/ext2fs/test_io.c",
"e2fsprogs/lib/ext2fs/undo_io.c",
"e2fsprogs/lib/ext2fs/unix_io.c",
"e2fsprogs/lib/ext2fs/unlink.c",
"e2fsprogs/lib/ext2fs/valid_blk.c",
"e2fsprogs/lib/ext2fs/version.c",
"${E2FSPROGS_DIR}/lib/ext2fs/alloc.c",
"${E2FSPROGS_DIR}/lib/ext2fs/alloc_sb.c",
"${E2FSPROGS_DIR}/lib/ext2fs/alloc_stats.c",
"${E2FSPROGS_DIR}/lib/ext2fs/alloc_tables.c",
"${E2FSPROGS_DIR}/lib/ext2fs/atexit.c",
"${E2FSPROGS_DIR}/lib/ext2fs/badblocks.c",
"${E2FSPROGS_DIR}/lib/ext2fs/bb_inode.c",
"${E2FSPROGS_DIR}/lib/ext2fs/bitmaps.c",
"${E2FSPROGS_DIR}/lib/ext2fs/bitops.c",
"${E2FSPROGS_DIR}/lib/ext2fs/blkmap64_ba.c",
"${E2FSPROGS_DIR}/lib/ext2fs/blkmap64_rb.c",
"${E2FSPROGS_DIR}/lib/ext2fs/blknum.c",
"${E2FSPROGS_DIR}/lib/ext2fs/block.c",
"${E2FSPROGS_DIR}/lib/ext2fs/bmap.c",
"${E2FSPROGS_DIR}/lib/ext2fs/check_desc.c",
"${E2FSPROGS_DIR}/lib/ext2fs/closefs.c",
"${E2FSPROGS_DIR}/lib/ext2fs/crc16.c",
"${E2FSPROGS_DIR}/lib/ext2fs/crc32c.c",
"${E2FSPROGS_DIR}/lib/ext2fs/csum.c",
"${E2FSPROGS_DIR}/lib/ext2fs/dblist.c",
"${E2FSPROGS_DIR}/lib/ext2fs/dblist_dir.c",
"${E2FSPROGS_DIR}/lib/ext2fs/digest_encode.c",
"${E2FSPROGS_DIR}/lib/ext2fs/dir_iterate.c",
"${E2FSPROGS_DIR}/lib/ext2fs/dirblock.c",
"${E2FSPROGS_DIR}/lib/ext2fs/dirhash.c",
"${E2FSPROGS_DIR}/lib/ext2fs/dupfs.c",
"${E2FSPROGS_DIR}/lib/ext2fs/expanddir.c",
"${E2FSPROGS_DIR}/lib/ext2fs/ext2_err.c",
"${E2FSPROGS_DIR}/lib/ext2fs/ext_attr.c",
"${E2FSPROGS_DIR}/lib/ext2fs/extent.c",
"${E2FSPROGS_DIR}/lib/ext2fs/fallocate.c",
"${E2FSPROGS_DIR}/lib/ext2fs/fileio.c",
"${E2FSPROGS_DIR}/lib/ext2fs/finddev.c",
"${E2FSPROGS_DIR}/lib/ext2fs/flushb.c",
"${E2FSPROGS_DIR}/lib/ext2fs/freefs.c",
"${E2FSPROGS_DIR}/lib/ext2fs/gen_bitmap.c",
"${E2FSPROGS_DIR}/lib/ext2fs/gen_bitmap64.c",
"${E2FSPROGS_DIR}/lib/ext2fs/get_num_dirs.c",
"${E2FSPROGS_DIR}/lib/ext2fs/get_pathname.c",
"${E2FSPROGS_DIR}/lib/ext2fs/getsectsize.c",
"${E2FSPROGS_DIR}/lib/ext2fs/getsize.c",
"${E2FSPROGS_DIR}/lib/ext2fs/hashmap.c",
"${E2FSPROGS_DIR}/lib/ext2fs/i_block.c",
"${E2FSPROGS_DIR}/lib/ext2fs/icount.c",
"${E2FSPROGS_DIR}/lib/ext2fs/imager.c",
"${E2FSPROGS_DIR}/lib/ext2fs/ind_block.c",
"${E2FSPROGS_DIR}/lib/ext2fs/initialize.c",
"${E2FSPROGS_DIR}/lib/ext2fs/inline.c",
"${E2FSPROGS_DIR}/lib/ext2fs/inline_data.c",
"${E2FSPROGS_DIR}/lib/ext2fs/inode.c",
"${E2FSPROGS_DIR}/lib/ext2fs/io_manager.c",
"${E2FSPROGS_DIR}/lib/ext2fs/ismounted.c",
"${E2FSPROGS_DIR}/lib/ext2fs/link.c",
"${E2FSPROGS_DIR}/lib/ext2fs/llseek.c",
"${E2FSPROGS_DIR}/lib/ext2fs/lookup.c",
"${E2FSPROGS_DIR}/lib/ext2fs/mkdir.c",
"${E2FSPROGS_DIR}/lib/ext2fs/mkjournal.c",
"${E2FSPROGS_DIR}/lib/ext2fs/mmp.c",
"${E2FSPROGS_DIR}/lib/ext2fs/namei.c",
"${E2FSPROGS_DIR}/lib/ext2fs/native.c",
"${E2FSPROGS_DIR}/lib/ext2fs/newdir.c",
"${E2FSPROGS_DIR}/lib/ext2fs/nls_utf8.c",
"${E2FSPROGS_DIR}/lib/ext2fs/openfs.c",
"${E2FSPROGS_DIR}/lib/ext2fs/progress.c",
"${E2FSPROGS_DIR}/lib/ext2fs/punch.c",
"${E2FSPROGS_DIR}/lib/ext2fs/qcow2.c",
"${E2FSPROGS_DIR}/lib/ext2fs/rbtree.c",
"${E2FSPROGS_DIR}/lib/ext2fs/read_bb.c",
"${E2FSPROGS_DIR}/lib/ext2fs/read_bb_file.c",
"${E2FSPROGS_DIR}/lib/ext2fs/res_gdt.c",
"${E2FSPROGS_DIR}/lib/ext2fs/rw_bitmaps.c",
"${E2FSPROGS_DIR}/lib/ext2fs/sha256.c",
"${E2FSPROGS_DIR}/lib/ext2fs/sha512.c",
"${E2FSPROGS_DIR}/lib/ext2fs/sparse_io.c",
"${E2FSPROGS_DIR}/lib/ext2fs/swapfs.c",
"${E2FSPROGS_DIR}/lib/ext2fs/symlink.c",
"${E2FSPROGS_DIR}/lib/ext2fs/test_io.c",
"${E2FSPROGS_DIR}/lib/ext2fs/undo_io.c",
"${E2FSPROGS_DIR}/lib/ext2fs/unix_io.c",
"${E2FSPROGS_DIR}/lib/ext2fs/unlink.c",
"${E2FSPROGS_DIR}/lib/ext2fs/valid_blk.c",
"${E2FSPROGS_DIR}/lib/ext2fs/version.c",
]
configs = [ ":libext2fs-defaults" ]
deps = [ ":libext2_com_err" ]
deps = [ ":libext2_com_err", ":e2fsprogs_action" ]
cflags = [ "-Wno-unused-parameter" ]
include_dirs = [
"//third_party/e2fsprogs/e2fsprogs/lib/ext2fs",
"//third_party/e2fsprogs/e2fsprogs/lib",
"${E2FSPROGS_DIR}/lib/ext2fs",
"${E2FSPROGS_DIR}/lib",
]
install_enable = true
subsystem_name = "thirdparty"
@@ -417,33 +691,33 @@ ohos_shared_library("libext2fs") {
###################################################
###Build libext2_ss
config("libext2_ss-headers") {
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib" ]
defines = [ "secure_getenv=getenv" ]
}
ohos_static_library("libext2_ss") {
sources = [
"e2fsprogs/lib/ss/data.c",
"e2fsprogs/lib/ss/error.c",
"e2fsprogs/lib/ss/execute_cmd.c",
"e2fsprogs/lib/ss/get_readline.c",
"e2fsprogs/lib/ss/help.c",
"e2fsprogs/lib/ss/invocation.c",
"e2fsprogs/lib/ss/list_rqs.c",
"e2fsprogs/lib/ss/listen.c",
"e2fsprogs/lib/ss/pager.c",
"e2fsprogs/lib/ss/parse.c",
"e2fsprogs/lib/ss/prompt.c",
"e2fsprogs/lib/ss/request_tbl.c",
"e2fsprogs/lib/ss/requests.c",
"e2fsprogs/lib/ss/ss_err.c",
"e2fsprogs/lib/ss/std_rqs.c",
"${E2FSPROGS_DIR}/lib/ss/data.c",
"${E2FSPROGS_DIR}/lib/ss/error.c",
"${E2FSPROGS_DIR}/lib/ss/execute_cmd.c",
"${E2FSPROGS_DIR}/lib/ss/get_readline.c",
"${E2FSPROGS_DIR}/lib/ss/help.c",
"${E2FSPROGS_DIR}/lib/ss/invocation.c",
"${E2FSPROGS_DIR}/lib/ss/list_rqs.c",
"${E2FSPROGS_DIR}/lib/ss/listen.c",
"${E2FSPROGS_DIR}/lib/ss/pager.c",
"${E2FSPROGS_DIR}/lib/ss/parse.c",
"${E2FSPROGS_DIR}/lib/ss/prompt.c",
"${E2FSPROGS_DIR}/lib/ss/request_tbl.c",
"${E2FSPROGS_DIR}/lib/ss/requests.c",
"${E2FSPROGS_DIR}/lib/ss/ss_err.c",
"${E2FSPROGS_DIR}/lib/ss/std_rqs.c",
]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/ss" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/ss" ]
configs = [ ":libext2_ss-headers" ]
deps = [ ":libext2_com_err" ]
deps = [ ":libext2_com_err", ":e2fsprogs_action" ]
}
###################################################
@@ -457,18 +731,18 @@ config("libext2_support-defaults") {
ohos_shared_library("libext2_quota") {
sources = [
"e2fsprogs/lib/support/dict.c",
"e2fsprogs/lib/support/mkquota.c",
"e2fsprogs/lib/support/parse_qtype.c",
"e2fsprogs/lib/support/plausible.c",
"e2fsprogs/lib/support/prof_err.c",
"e2fsprogs/lib/support/profile.c",
"e2fsprogs/lib/support/profile_helpers.c",
"e2fsprogs/lib/support/quotaio.c",
"e2fsprogs/lib/support/quotaio_tree.c",
"e2fsprogs/lib/support/quotaio_v2.c",
"${E2FSPROGS_DIR}/lib/support/dict.c",
"${E2FSPROGS_DIR}/lib/support/mkquota.c",
"${E2FSPROGS_DIR}/lib/support/parse_qtype.c",
"${E2FSPROGS_DIR}/lib/support/plausible.c",
"${E2FSPROGS_DIR}/lib/support/prof_err.c",
"${E2FSPROGS_DIR}/lib/support/profile.c",
"${E2FSPROGS_DIR}/lib/support/profile_helpers.c",
"${E2FSPROGS_DIR}/lib/support/quotaio.c",
"${E2FSPROGS_DIR}/lib/support/quotaio_tree.c",
"${E2FSPROGS_DIR}/lib/support/quotaio_v2.c",
]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/support" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/support" ]
configs = [
":libext2_support-defaults",
":libext2-headers",
@@ -477,6 +751,7 @@ ohos_shared_library("libext2_quota") {
":libext2_blkid",
":libext2_com_err",
":libext2fs",
":e2fsprogs_action"
]
install_enable = true
subsystem_name = "thirdparty"
@@ -491,27 +766,28 @@ ohos_shared_library("libext2_quota") {
###Build libext2_profile
ohos_static_library("libext2_profile") {
sources = [
"e2fsprogs/lib/support/prof_err.c",
"e2fsprogs/lib/support/profile.c",
"${E2FSPROGS_DIR}/lib/support/prof_err.c",
"${E2FSPROGS_DIR}/lib/support/profile.c",
]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/support" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/support" ]
configs = [
":libext2-headers",
":libext2_support-defaults",
]
deps = [ ":libext2_com_err" ]
deps = [ ":libext2_com_err", ":e2fsprogs_action" ]
}
###################################################
###Build libext2_support
ohos_static_library("libext2_support") {
sources = [ "e2fsprogs/lib/support/cstring.c" ]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/support" ]
sources = [ "${E2FSPROGS_DIR}/lib/support/cstring.c" ]
include_dirs = [ "${E2FSPROGS_DIR}/lib/support" ]
configs = [
":libext2_support-defaults",
":libext2-headers",
]
deps = [":e2fsprogs_action"]
}
###################################################
@@ -525,18 +801,19 @@ config("libext2_uuid-defaults") {
ohos_shared_library("libext2_uuid") {
sources = [
"e2fsprogs/lib/uuid/clear.c",
"e2fsprogs/lib/uuid/compare.c",
"e2fsprogs/lib/uuid/copy.c",
"e2fsprogs/lib/uuid/gen_uuid.c",
"e2fsprogs/lib/uuid/isnull.c",
"e2fsprogs/lib/uuid/pack.c",
"e2fsprogs/lib/uuid/parse.c",
"e2fsprogs/lib/uuid/unpack.c",
"e2fsprogs/lib/uuid/unparse.c",
"e2fsprogs/lib/uuid/uuid_time.c",
"${E2FSPROGS_DIR}/lib/uuid/clear.c",
"${E2FSPROGS_DIR}/lib/uuid/compare.c",
"${E2FSPROGS_DIR}/lib/uuid/copy.c",
"${E2FSPROGS_DIR}/lib/uuid/gen_uuid.c",
"${E2FSPROGS_DIR}/lib/uuid/isnull.c",
"${E2FSPROGS_DIR}/lib/uuid/pack.c",
"${E2FSPROGS_DIR}/lib/uuid/parse.c",
"${E2FSPROGS_DIR}/lib/uuid/unpack.c",
"${E2FSPROGS_DIR}/lib/uuid/unparse.c",
"${E2FSPROGS_DIR}/lib/uuid/uuid_time.c",
]
include_dirs = [ "//third_party/e2fsprogs/e2fsprogs/lib/uuid" ]
deps = [":e2fsprogs_action"]
include_dirs = [ "${E2FSPROGS_DIR}/lib/uuid" ]
cflags = [
"-Wno-unused-function",
"-Wno-unused-parameter",
@@ -564,16 +841,17 @@ config("libext2_misc-defaults") {
ohos_shared_library("libext2_misc") {
configs = [ ":libext2_misc-defaults" ]
sources = [ "e2fsprogs/misc/create_inode.c" ]
sources = [ "${E2FSPROGS_DIR}/misc/create_inode.c" ]
include_dirs = [
"//third_party/e2fsprogs/e2fsprogs/misc",
"//third_party/e2fsprogs/e2fsprogs/lib",
"${E2FSPROGS_DIR}/misc",
"${E2FSPROGS_DIR}/lib",
]
cflags = [ "-Wno-error=format-extra-args" ]
deps = [
":libext2_com_err",
":libext2fs",
":e2fsprogs_action"
]
install_enable = true
subsystem_name = "thirdparty"
@@ -589,17 +867,17 @@ ohos_shared_library("libext2_misc") {
ohos_executable("mke2fs") {
configs = [ ":libext2_misc-defaults" ]
sources = [
"e2fsprogs/misc/default_profile.c",
"e2fsprogs/misc/mk_hugefiles.c",
"e2fsprogs/misc/mke2fs.c",
"e2fsprogs/misc/util.c",
"${E2FSPROGS_DIR}/misc/default_profile.c",
"${E2FSPROGS_DIR}/misc/mk_hugefiles.c",
"${E2FSPROGS_DIR}/misc/mke2fs.c",
"${E2FSPROGS_DIR}/misc/util.c",
]
include_dirs = [
"//third_party/e2fsprogs/e2fsprogs/misc",
"//third_party/e2fsprogs/e2fsprogs/e2fsck",
"//third_party/e2fsprogs/e2fsprogs/lib",
"//third_party/e2fsprogs/e2fsprogs/lib/ext2fs",
"${E2FSPROGS_DIR}/misc",
"${E2FSPROGS_DIR}/e2fsck",
"${E2FSPROGS_DIR}/lib",
"${E2FSPROGS_DIR}/lib/ext2fs",
]
cflags = [
"-Wno-error=format",
@@ -615,6 +893,7 @@ ohos_executable("mke2fs") {
":libext2_quota",
":libext2_uuid",
":libext2fs",
":e2fsprogs_action"
]
install_enable = true
@@ -630,12 +909,12 @@ ohos_executable("mke2fs") {
###Build blkid
ohos_executable("blkid") {
configs = [ ":libext2_misc-defaults" ]
sources = [ "e2fsprogs/misc/blkid.c" ]
sources = [ "${E2FSPROGS_DIR}/misc/blkid.c" ]
include_dirs = [
"//third_party/e2fsprogs/e2fsprogs/misc",
"//third_party/e2fsprogs/e2fsprogs/lib",
"//third_party/e2fsprogs/e2fsprogs/lib/blkid",
"${E2FSPROGS_DIR}/misc",
"${E2FSPROGS_DIR}/lib",
"${E2FSPROGS_DIR}/lib/blkid",
]
cflags = [
"-Wno-error=format",
@@ -646,6 +925,7 @@ ohos_executable("blkid") {
deps = [
":libext2_blkid",
":libext2fs",
":e2fsprogs_action"
]
install_enable = true
@@ -667,19 +947,19 @@ config("resize2fs-defaults") {
ohos_executable("resize2fs") {
configs = [ ":resize2fs-defaults" ]
sources = [
"e2fsprogs/resize/extent.c",
"e2fsprogs/resize/main.c",
"e2fsprogs/resize/online.c",
"e2fsprogs/resize/resize2fs.c",
"e2fsprogs/resize/resource_track.c",
"e2fsprogs/resize/sim_progress.c",
"${E2FSPROGS_DIR}/resize/extent.c",
"${E2FSPROGS_DIR}/resize/main.c",
"${E2FSPROGS_DIR}/resize/online.c",
"${E2FSPROGS_DIR}/resize/resize2fs.c",
"${E2FSPROGS_DIR}/resize/resource_track.c",
"${E2FSPROGS_DIR}/resize/sim_progress.c",
]
include_dirs = [
"//third_party/e2fsprogs/e2fsprogs/resize",
"//third_party/e2fsprogs/e2fsprogs/e2fsck",
"//third_party/e2fsprogs/e2fsprogs/lib",
"//third_party/e2fsprogs/e2fsprogs/lib/ext2fs",
"${E2FSPROGS_DIR}/resize",
"${E2FSPROGS_DIR}/e2fsck",
"${E2FSPROGS_DIR}/lib",
"${E2FSPROGS_DIR}/lib/ext2fs",
]
cflags = [
"-Wno-error=format",
@@ -691,6 +971,7 @@ ohos_executable("resize2fs") {
":libext2_com_err",
":libext2_e2p",
":libext2fs",
":e2fsprogs_action"
]
if (is_ohos) {
+1 -1
View File
@@ -35,7 +35,7 @@
"inner_kits": [
{
"header": {
"header_base": "//third_party/e2fsprogs/e2fsprogs/lib",
"header_base": "${root_gen_dir}/third_party/e2fsprogs/e2fsprogs/lib",
"header_files": ["config.h"]
},
"name": "//third_party/e2fsprogs:libext2_blkid"
-3
View File
@@ -1,3 +0,0 @@
e2fsprogs_path = rebase_path("//third_party/e2fsprogs")
exec_script("install.sh", [ "$e2fsprogs_path" ])
print("e2fsprogs installed successfully")
+53 -51
View File
@@ -7,61 +7,63 @@
# Copyright(c) 2023 Huawei Device Co., Ltd.
set -e
set -x
mkdir -p $1
cd $1
touch test.lock
(
flock -x 200
if [ -d "e2fsprogs" ];then
exit 0
rm -rf e2fsprogs
fi
tar xvf e2fsprogs.tar.xz
cd $1/e2fsprogs
patch -p1 < $1/0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0002-libss-add-newer-libreadline.so.8-to-dlopen-path.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0003-tests-update-expect-files-for-f_mmp_garbage.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0004-tests-update-expect-files-for-f_large_dir-and-f_larg.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0005-resize2fs-resize2fs-disk-hardlinks-will-be-error.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0006-e2fsck-exit-journal-recovery-when-find-EIO-ENOMEM-er.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0007-e2fsck-exit-journal-recovery-when-jounral-superblock.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0010-tests-update-expect-file-for-u_direct_io.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0012-tests-fix-ACL-printing-tests.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0013-e2fsck-do-not-clean-up-file-acl-if-the-inode-is-trun.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0014-e2fsck-handle-level-is-overflow-in-ext2fs_extent_get.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0015-libext2fs-add-sanity-check-to-extent-manipulation.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0016-e2fsprogs-add-sw64.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0017-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0018-debugfs-teach-logdump-the-n-num_trans-option.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0019-tune2fs-fix-tune2fs-segfault-when-ext2fs_run_ext3_jo.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0020-tune2fs-tune2fs_main-should-return-rc-when-some-erro.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0021-tune2fs-exit-directly-when-fs-freed-in-ext2fs_run_ext3_journal.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0022-unix_io.c-fix-deadlock-problem-in-unix_write_blk64.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0023-debugfs-fix-repeated-output-problem-with-logdump-O-n.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0024-tune2fs-check-return-value-of-ext2fs_mmp_update2-in-.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0025-mmp-fix-wrong-comparison-in-ext2fs_mmp_stop.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0026-misc-fsck.c-Processes-may-kill-other-processes.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0027-dumpe2fs-resize2fs-avoid-memory-leak-on-error-path.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0028-libext2fs-fix-memory-leak-in-error-path-while-openin.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0029-e2fsck-avoid-theoretical-null-dereference-in-end_pro.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0030-e2fsck-fix-potential-out-of-bounds-read-in-inc_ea_in.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0031-e2fsck-avoid-out-of-bounds-write-for-very-deep-exten.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0032-e2fsck-fix-potential-fencepost-error-in-e2fsck_shoul.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0033-libext2fs-fix-potential-integer-overflow-in-bitmap-a.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0034-tune2fs-fix-an-error-message.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0035-e2fsck-don-t-allow-journal-inode-to-have-encrypt-fla.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0036-lib-ext2fs-fix-unbalanced-mutex-unlock-for-BOUNCE_MT.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0037-libext2fs-fix-ext2fs_compare_generic_bmap-logic.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0038-Quiet-unused-variable-warnings.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0039-ext2fs-Use-64bit-lseek-when-_FILE_OFFSET_BITS-is-64.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0040-e2fsck-fix-bad-htree-checksums-in-preen-mode.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/0041-debugfs-Fix-infinite-loop-when-dump-log.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/1001-image-make.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/1002-add-header-file-to-musl-compile-mk2efs.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/1003-add-dac-config.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/1004-modify-code-to-compile.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/1005-read-vfat-chinese-label.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $1/1006-add-hmfs-for-blkid.patch --fuzz=0 --no-backup-if-mismatch
tar xvf $2/e2fsprogs.tar.xz
cd e2fsprogs
patch -p1 < $2/0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0002-libss-add-newer-libreadline.so.8-to-dlopen-path.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0003-tests-update-expect-files-for-f_mmp_garbage.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0004-tests-update-expect-files-for-f_large_dir-and-f_larg.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0005-resize2fs-resize2fs-disk-hardlinks-will-be-error.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0006-e2fsck-exit-journal-recovery-when-find-EIO-ENOMEM-er.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0007-e2fsck-exit-journal-recovery-when-jounral-superblock.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0010-tests-update-expect-file-for-u_direct_io.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0012-tests-fix-ACL-printing-tests.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0013-e2fsck-do-not-clean-up-file-acl-if-the-inode-is-trun.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0014-e2fsck-handle-level-is-overflow-in-ext2fs_extent_get.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0015-libext2fs-add-sanity-check-to-extent-manipulation.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0016-e2fsprogs-add-sw64.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0017-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0018-debugfs-teach-logdump-the-n-num_trans-option.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0019-tune2fs-fix-tune2fs-segfault-when-ext2fs_run_ext3_jo.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0020-tune2fs-tune2fs_main-should-return-rc-when-some-erro.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0021-tune2fs-exit-directly-when-fs-freed-in-ext2fs_run_ext3_journal.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0022-unix_io.c-fix-deadlock-problem-in-unix_write_blk64.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0023-debugfs-fix-repeated-output-problem-with-logdump-O-n.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0024-tune2fs-check-return-value-of-ext2fs_mmp_update2-in-.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0025-mmp-fix-wrong-comparison-in-ext2fs_mmp_stop.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0026-misc-fsck.c-Processes-may-kill-other-processes.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0027-dumpe2fs-resize2fs-avoid-memory-leak-on-error-path.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0028-libext2fs-fix-memory-leak-in-error-path-while-openin.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0029-e2fsck-avoid-theoretical-null-dereference-in-end_pro.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0030-e2fsck-fix-potential-out-of-bounds-read-in-inc_ea_in.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0031-e2fsck-avoid-out-of-bounds-write-for-very-deep-exten.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0032-e2fsck-fix-potential-fencepost-error-in-e2fsck_shoul.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0033-libext2fs-fix-potential-integer-overflow-in-bitmap-a.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0034-tune2fs-fix-an-error-message.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0035-e2fsck-don-t-allow-journal-inode-to-have-encrypt-fla.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0036-lib-ext2fs-fix-unbalanced-mutex-unlock-for-BOUNCE_MT.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0037-libext2fs-fix-ext2fs_compare_generic_bmap-logic.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0038-Quiet-unused-variable-warnings.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0039-ext2fs-Use-64bit-lseek-when-_FILE_OFFSET_BITS-is-64.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0040-e2fsck-fix-bad-htree-checksums-in-preen-mode.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/0041-debugfs-Fix-infinite-loop-when-dump-log.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/1001-image-make.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/1002-add-header-file-to-musl-compile-mk2efs.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/1003-add-dac-config.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/1004-modify-code-to-compile.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/1005-read-vfat-chinese-label.patch --fuzz=0 --no-backup-if-mismatch
patch -p1 < $2/1006-add-hmfs-for-blkid.patch --fuzz=0 --no-backup-if-mismatch
exit 0
)200>$1/test.lock
)200>test.lock