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
This commit is contained in:
David Anderson 2023-06-30 10:24:37 -07:00
parent 75c5deed52
commit c132bf80ae
2 changed files with 27 additions and 4 deletions

View file

@ -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"],

View file

@ -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",