package( default_visibility = [ "@//:android_cuttlefish", "@f2fs_tools//:__subpackages__", ], ) cc_binary( name = "e2fsdroid", srcs = [ "contrib/android/basefs_allocator.c", "contrib/android/basefs_allocator.h", "contrib/android/base_fs.c", "contrib/android/base_fs.h", "contrib/android/block_list.c", "contrib/android/block_list.h", "contrib/android/block_range.c", "contrib/android/block_range.h", "contrib/android/e2fsdroid.c", "contrib/android/fsmap.c", "contrib/android/fsmap.h", "contrib/android/perms.c", "contrib/android/perms.h", ], includes = [ "contrib/android", "lib", "misc", ], deps = [ "@//android:log_header", "@//build_external/e2fsprogs:e2fsprogs_config", "@//libbase", "@//libcutils", "@//libsparse", "@selinux//:libselinux", "@boringssl//:crypto", "@zlib", ":libext2fs", ":libext2_com_err", ":libext2_misc", ], ) cc_library( name = "e2fsprogs_version", hdrs = [ "version.h", ], ) cc_binary( name = "e2fsck", srcs = [ "e2fsck/badblocks.c", "e2fsck/dirinfo.c", "e2fsck/dx_dirinfo.c", "e2fsck/e2fsck.c", "e2fsck/e2fsck.h", "e2fsck/ea_refcount.c", "e2fsck/ehandler.c", "e2fsck/encrypted_files.c", "e2fsck/extents.c", "e2fsck/jfs_user.h", "e2fsck/journal.c", "e2fsck/logfile.c", "e2fsck/message.c", "e2fsck/pass1.c", "e2fsck/pass1b.c", "e2fsck/pass2.c", "e2fsck/pass3.c", "e2fsck/pass4.c", "e2fsck/pass5.c", "e2fsck/problem.c", "e2fsck/problem.h", "e2fsck/problemP.h", "e2fsck/quota.c", "e2fsck/readahead.c", "e2fsck/recovery.c", "e2fsck/region.c", "e2fsck/rehash.c", "e2fsck/revoke.c", "e2fsck/sigcatcher.c", "e2fsck/super.c", "e2fsck/unix.c", "e2fsck/util.c", ], includes = [ "e2fsck", ], deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", "@//build_external/e2fsprogs:libext2_quota_generated", ":e2fsprogs_version", ":libext2fs", ":libext2_blkid", ":libext2_com_err", ":libext2_e2p", ":libext2_quota", ":libext2_uuid", ], ) libext2fs_headers = [ "lib/ext2fs/bitops.h", "lib/ext2fs/compiler.h", "lib/ext2fs/ext2fs.h", "lib/ext2fs/ext2_ext_attr.h", "lib/ext2fs/ext2_io.h", "lib/ext2fs/ext2_fs.h", "lib/ext2fs/ext3_extents.h", "lib/ext2fs/fast_commit.h", "lib/ext2fs/fiemap.h", "lib/ext2fs/hashmap.h", "lib/ext2fs/jfs_compat.h", "lib/ext2fs/kernel-jbd.h", "lib/ext2fs/kernel-list.h", ] cc_library( name = "libext2fs", srcs = [ "lib/ext2fs/alloc.c", "lib/ext2fs/alloc_sb.c", "lib/ext2fs/alloc_stats.c", "lib/ext2fs/alloc_tables.c", "lib/ext2fs/atexit.c", "lib/ext2fs/badblocks.c", "lib/ext2fs/bb_inode.c", "lib/ext2fs/bitmaps.c", "lib/ext2fs/bitops.c", "lib/ext2fs/blkmap64_ba.c", "lib/ext2fs/blkmap64_rb.c", "lib/ext2fs/blknum.c", "lib/ext2fs/block.c", "lib/ext2fs/bmap.c", "lib/ext2fs/bmap64.h", "lib/ext2fs/check_desc.c", "lib/ext2fs/closefs.c", "lib/ext2fs/crc16.c", "lib/ext2fs/crc16.h", "lib/ext2fs/crc32c.c", "lib/ext2fs/crc32c_defs.h", "lib/ext2fs/csum.c", "lib/ext2fs/dblist.c", "lib/ext2fs/dblist_dir.c", "lib/ext2fs/digest_encode.c", "lib/ext2fs/dirblock.c", "lib/ext2fs/dirhash.c", "lib/ext2fs/dir_iterate.c", "lib/ext2fs/dupfs.c", "lib/ext2fs/e2image.h", "lib/ext2fs/expanddir.c", "lib/ext2fs/ext2fsP.h", "lib/ext2fs/ext3_extents.h", "lib/ext2fs/ext4_acl.h", "lib/ext2fs/ext_attr.c", "lib/ext2fs/extent.c", "lib/ext2fs/fallocate.c", "lib/ext2fs/fileio.c", "lib/ext2fs/finddev.c", "lib/ext2fs/flushb.c", "lib/ext2fs/freefs.c", "lib/ext2fs/gen_bitmap64.c", "lib/ext2fs/gen_bitmap.c", "lib/ext2fs/get_num_dirs.c", "lib/ext2fs/get_pathname.c", "lib/ext2fs/getenv.c", "lib/ext2fs/getsectsize.c", "lib/ext2fs/getsize.c", "lib/ext2fs/hashmap.c", "lib/ext2fs/i_block.c", "lib/ext2fs/icount.c", "lib/ext2fs/imager.c", "lib/ext2fs/ind_block.c", "lib/ext2fs/initialize.c", "lib/ext2fs/inline.c", "lib/ext2fs/inline_data.c", "lib/ext2fs/inode.c", "lib/ext2fs/io_manager.c", "lib/ext2fs/ismounted.c", "lib/ext2fs/link.c", "lib/ext2fs/llseek.c", "lib/ext2fs/lookup.c", "lib/ext2fs/mkdir.c", "lib/ext2fs/mkjournal.c", "lib/ext2fs/mmp.c", "lib/ext2fs/namei.c", "lib/ext2fs/native.c", "lib/ext2fs/newdir.c", "lib/ext2fs/nls_utf8.c", "lib/ext2fs/openfs.c", "lib/ext2fs/orphan.c", "lib/ext2fs/progress.c", "lib/ext2fs/punch.c", "lib/ext2fs/qcow2.c", "lib/ext2fs/qcow2.h", "lib/ext2fs/rbtree.c", "lib/ext2fs/rbtree.h", "lib/ext2fs/read_bb.c", "lib/ext2fs/read_bb_file.c", "lib/ext2fs/res_gdt.c", "lib/ext2fs/rw_bitmaps.c", "lib/ext2fs/sha256.c", "lib/ext2fs/sha512.c", "lib/ext2fs/sparse_io.c", "lib/ext2fs/swapfs.c", "lib/ext2fs/symlink.c", "lib/ext2fs/tdb.h", "lib/ext2fs/test_io.c", "lib/ext2fs/undo_io.c", "lib/ext2fs/unix_io.c", "lib/ext2fs/unlink.c", "lib/ext2fs/utf8data.h", "lib/ext2fs/utf8n.h", "lib/ext2fs/valid_blk.c", "lib/ext2fs/version.c", ], includes = [ "lib", "lib/ext2fs", ], hdrs = libext2fs_headers, strip_include_prefix = "lib", deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", "@//build_external/e2fsprogs:libext2fs_generated_private", "@//libsparse", "@zlib", ":e2fsprogs_version", ":libext2_com_err", ":libext2_e2p_headers", ], ) cc_library( name = "libext2fs_headers", hdrs = libext2fs_headers, strip_include_prefix = "lib", ) cc_library( name = "libext2_blkid", srcs = [ "lib/blkid/blkidP.h", "lib/blkid/cache.c", "lib/blkid/dev.c", "lib/blkid/devname.c", "lib/blkid/devno.c", "lib/blkid/getsize.c", "lib/blkid/list.h", "lib/blkid/llseek.c", "lib/blkid/probe.c", "lib/blkid/probe.h", "lib/blkid/read.c", "lib/blkid/resolve.c", "lib/blkid/save.c", "lib/blkid/tag.c", "lib/blkid/version.c", ], includes = [ "lib", ], deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", "@//build_external/e2fsprogs:libext2_blkid_generated", ":e2fsprogs_version", ":libext2_uuid", ], ) libext2_com_err_headers = [ "lib/et/com_err.h", ] cc_library( name = "libext2_com_err", srcs = [ "lib/et/error_message.c", "lib/et/error_table.h", "lib/et/et_name.c", "lib/et/init_et.c", "lib/et/internal.h", "lib/et/com_err.c", "lib/et/com_right.c", ], includes = [ "lib", ], hdrs = libext2_com_err_headers, strip_include_prefix = "lib", deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", ], ) cc_library( name = "libext2_com_err_headers", hdrs = libext2_com_err_headers, strip_include_prefix = "lib", ) libext2_e2p_headers = [ "lib/e2p/e2p.h", ] cc_library( name = "libext2_e2p", srcs = [ "lib/e2p/encoding.c", "lib/e2p/errcode.c", "lib/e2p/feature.c", "lib/e2p/fgetflags.c", "lib/e2p/fsetflags.c", "lib/e2p/fgetproject.c", "lib/e2p/fsetproject.c", "lib/e2p/fgetversion.c", "lib/e2p/fsetversion.c", "lib/e2p/getflags.c", "lib/e2p/getversion.c", "lib/e2p/hashstr.c", "lib/e2p/iod.c", "lib/e2p/ljs.c", "lib/e2p/ls.c", "lib/e2p/mntopts.c", "lib/e2p/ostype.c", "lib/e2p/parse_num.c", "lib/e2p/pe.c", "lib/e2p/percent.c", "lib/e2p/pf.c", "lib/e2p/project.h", "lib/e2p/ps.c", "lib/e2p/setflags.c", "lib/e2p/setversion.c", "lib/e2p/uuid.c", ], includes = [ "lib", ], hdrs = libext2_e2p_headers, strip_include_prefix = "lib", deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", "@//build_external/e2fsprogs:libext2fs_generated", ":libext2fs_headers", ":libext2_com_err_headers", ":libext2_quota_headers", ], ) cc_library( name = "libext2_e2p_headers", hdrs = libext2_e2p_headers, strip_include_prefix = "lib", ) cc_library( name = "libext2_misc", srcs = [ "lib/e2p/e2p.h", "lib/support/nls-enable.h", "misc/create_inode.c", "misc/create_inode_libarchive.c", ], includes = [ "lib", ], hdrs = [ "misc/create_inode.h", "misc/create_inode_libarchive.h", ], strip_include_prefix = "misc", deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", ":libext2fs", ":libext2_com_err", ":libext2_quota", ], ) libext2_quota_headers = [ "lib/support/dqblk_v2.h", "lib/support/quotaio.h", "lib/support/quotaio_tree.h", "lib/support/sort_r.h", ] cc_library( name = "libext2_quota", srcs = [ "lib/support/common.h", "lib/support/devname.c", "lib/support/devname.h", "lib/support/dict.c", "lib/support/dict.h", "lib/support/mkquota.c", "lib/support/nls-enable.h", "lib/support/parse_qtype.c", "lib/support/plausible.c", "lib/support/plausible.h", "lib/support/profile.c", "lib/support/profile.h", "lib/support/profile_helpers.c", "lib/support/profile_helpers.h", "lib/support/quotaio.c", "lib/support/quotaio_tree.c", "lib/support/quotaio_v2.c", "lib/support/quotaio_v2.h", ], includes = [ "lib", ], hdrs = libext2_quota_headers, strip_include_prefix = "lib", deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", "@//build_external/e2fsprogs:libext2_quota_generated_private", ":libext2fs", ":libext2_blkid", ":libext2_com_err", ], ) cc_library( name = "libext2_quota_headers", hdrs = libext2_quota_headers, strip_include_prefix = "lib", ) cc_library( name = "libext2_uuid", srcs = [ "lib/uuid/clear.c", "lib/uuid/compare.c", "lib/uuid/copy.c", "lib/uuid/gen_uuid.c", "lib/uuid/isnull.c", "lib/uuid/pack.c", "lib/uuid/parse.c", "lib/uuid/unpack.c", "lib/uuid/unparse.c", "lib/uuid/uuidd.h", "lib/uuid/uuidP.h", "lib/uuid/uuid_time.c", ], includes = [ "lib", ], deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", "@//build_external/e2fsprogs:libext2_uuid_generated", ], ) cc_binary( name = "mke2fs", srcs = [ "misc/mke2fs.c", "misc/mke2fs.h", "misc/mk_hugefiles.c", "misc/util.c", "misc/util.h", ], includes = [ "e2fsck", "lib", ], deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", "@//build_external/e2fsprogs:libext2_quota_generated", "@//build_external/e2fsprogs:mke2fs_generated", "@//libbase", "@//libsparse", "@zlib", ":e2fsprogs_version", ":libext2fs", ":libext2_blkid", ":libext2_com_err", ":libext2_e2p", ":libext2_misc", ":libext2_quota", ":libext2_uuid", ], ) cc_binary( name = "resize2fs", srcs = [ "resize/extent.c", "resize/main.c", "resize/online.c", "resize/resize2fs.c", "resize/resize2fs.h", "resize/resource_track.c", "resize/sim_progress.c", ], includes = [ "resize", ], deps = [ "@//build_external/e2fsprogs:e2fsprogs_config", ":e2fsprogs_version", ":libext2fs", ":libext2_com_err", ":libext2_e2p", ":libext2_uuid", ":libext2_blkid", ], )