Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c132bf80 authored by David Anderson's avatar David Anderson
Browse files

snapuserd: Remove dependence on libfs_mgr.

The only function we use from libfs_mgr is WaitForFile, so factor that
out into libfs_mgr_file_wait. libfs_mgr has too much dependence on AOSP
internals to build on the host.

Bug: 288273605
Test: builds
Change-Id: I8e5eb4075ae01b9ca64074422171a487179e7943
parent 75c5deed
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -171,6 +171,25 @@ cc_library {
    ],
}

cc_library_static {
    name: "libfs_mgr_file_wait",
    defaults: ["fs_mgr_defaults"],
    export_include_dirs: ["include"],
    cflags: [
        "-D_FILE_OFFSET_BITS=64",
    ],
    srcs: [
        "file_wait.cpp",
    ],
    shared_libs: [
        "libbase",
    ],
    host_supported: true,
    ramdisk_available: true,
    vendor_ramdisk_available: true,
    recovery_available: true,
}

cc_binary {
    name: "remount",
    defaults: ["fs_mgr_defaults"],
+8 −4
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ cc_library_static {
    recovery_available: true,
    static_libs: [
        "libcutils_sockets",
        "libfs_mgr",
        "libfs_mgr_file_wait",
    ],
    shared_libs: [
        "libbase",
@@ -75,6 +75,7 @@ cc_library_static {
    static_libs: [
        "libbase",
        "libdm",
        "libext2_uuid",
        "libext4_utils",
        "libsnapshot_cow",
        "liburing",
@@ -105,7 +106,8 @@ cc_defaults {
        "libbrotli",
        "libcutils_sockets",
        "libdm",
        "libfs_mgr",
        "libext2_uuid",
        "libfs_mgr_file_wait",
        "libgflags",
        "liblog",
        "libsnapshot_cow",
@@ -193,9 +195,10 @@ cc_test {
        "libsnapuserd_client",
        "libcutils_sockets",
        "libz",
        "libfs_mgr",
        "libdm",
        "libext2_uuid",
        "libext4_utils",
        "libfs_mgr_file_wait",
    ],
    header_libs: [
        "libstorage_literals_headers",
@@ -225,8 +228,9 @@ cc_test {
        "libbrotli",
        "libcutils_sockets",
        "libdm",
        "libext2_uuid",
        "libext4_utils",
        "libfs_mgr",
        "libfs_mgr_file_wait",
        "libgflags",
        "libgtest",
        "libsnapshot_cow",