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
diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp
index 4e4d20e..87db98b 100644
--- a/fs_mgr/Android.bp
+++ b/fs_mgr/Android.bp
@@ -171,6 +171,25 @@
],
}
+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"],
diff --git a/fs_mgr/libsnapshot/snapuserd/Android.bp b/fs_mgr/libsnapshot/snapuserd/Android.bp
index 20eef71..dddc907 100644
--- a/fs_mgr/libsnapshot/snapuserd/Android.bp
+++ b/fs_mgr/libsnapshot/snapuserd/Android.bp
@@ -41,7 +41,7 @@
recovery_available: true,
static_libs: [
"libcutils_sockets",
- "libfs_mgr",
+ "libfs_mgr_file_wait",
],
shared_libs: [
"libbase",
@@ -75,6 +75,7 @@
static_libs: [
"libbase",
"libdm",
+ "libext2_uuid",
"libext4_utils",
"libsnapshot_cow",
"liburing",
@@ -105,7 +106,8 @@
"libbrotli",
"libcutils_sockets",
"libdm",
- "libfs_mgr",
+ "libext2_uuid",
+ "libfs_mgr_file_wait",
"libgflags",
"liblog",
"libsnapshot_cow",
@@ -193,9 +195,10 @@
"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 @@
"libbrotli",
"libcutils_sockets",
"libdm",
+ "libext2_uuid",
"libext4_utils",
- "libfs_mgr",
+ "libfs_mgr_file_wait",
"libgflags",
"libgtest",
"libsnapshot_cow",