Merge "aconfig: update cpp codegen" into main am: 41cb1204d5
am: 57b758db32
Original change: https://android-review.googlesource.com/c/platform/build/+/3273637 Change-Id: Iaa32eb02942fb5f05465ccd893bc850905728567 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
{{ if allow_instrumentation }}
|
||||
{{ if readwrite- }}
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "aconfig_storage/aconfig_storage_read_api.hpp"
|
||||
#include <android/log.h>
|
||||
#define LOG_TAG "aconfig_cpp_codegen"
|
||||
@@ -78,8 +78,7 @@ namespace {cpp_namespace} \{
|
||||
, flag_value_file_(nullptr)
|
||||
, read_from_new_storage_(false) \{
|
||||
|
||||
struct stat buffer;
|
||||
if (stat("/metadata/aconfig/boot/enable_only_new_storage", &buffer) == 0) \{
|
||||
if (access("/metadata/aconfig/boot/enable_only_new_storage", F_OK) == 0) \{
|
||||
read_from_new_storage_ = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user