Remove some globals from system_properties
pa_size should be static to prop_area, so make it so.
__system_property_area__ was reused for various purposes, but
realistically is a deprecated symbol and this finally separates us
from it.
Bug: 36001741
Test: boot bullhead, system property unit tests
Change-Id: I39663cc3b613093fa4c728b21d8ba58754f8e105
diff --git a/libc/system_properties/contexts_split.h b/libc/system_properties/contexts_split.h
index fced33c..f98eb44 100644
--- a/libc/system_properties/contexts_split.h
+++ b/libc/system_properties/contexts_split.h
@@ -41,16 +41,21 @@
virtual bool Initialize(bool writable) override;
virtual prop_area* GetPropAreaForName(const char* name) override;
+ virtual prop_area* GetSerialPropArea() override {
+ return serial_prop_area_;
+ }
virtual void ForEach(void (*propfn)(const prop_info* pi, void* cookie), void* cookie) override;
virtual void ResetAccess() override;
virtual void FreeAndUnmap() override;
private:
+ bool MapSerialPropertyArea(bool access_rw, bool* fsetxattr_failed);
bool InitializePropertiesFromFile(const char* filename);
bool InitializeProperties();
PrefixNode* prefixes_ = nullptr;
ContextListNode* contexts_ = nullptr;
+ prop_area* serial_prop_area_ = nullptr;
};
#endif