Flag guard to make fsverity_init a no-op
As early as fsverity_init, the flag can only be static (thus
is_fixed_read_only). It is now a constant/false and will be flipped
during the ramp up at build time.
Bug: 290064770
Test: mma
Test: Inspect the generated code
Change-Id: I4bd1addb996705f6e6b9f75313bf22b9ecd3e11c
diff --git a/fsverity_init/Android.bp b/fsverity_init/Android.bp
index 07eaf6a..d9bff3b 100644
--- a/fsverity_init/Android.bp
+++ b/fsverity_init/Android.bp
@@ -13,6 +13,7 @@
"fsverity_init.cpp",
],
static_libs: [
+ "aconfig_fsverity_init_c_lib",
"libc++fs",
"libmini_keyctl_static",
],
@@ -23,3 +24,14 @@
],
cflags: ["-Werror", "-Wall", "-Wextra"],
}
+
+aconfig_declarations {
+ name: "aconfig_fsverity_init",
+ package: "android.security.flag",
+ srcs: ["flags.aconfig"],
+}
+
+cc_aconfig_library {
+ name: "aconfig_fsverity_init_c_lib",
+ aconfig_declarations: "aconfig_fsverity_init",
+}