Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06248774 authored by Steven Moreland's avatar Steven Moreland
Browse files

libprocpartition: support product/system_ext

Relevant in AIDL world.

Bug: 385355208
Test: atest vts_treble_vintf_vendor_test
Change-Id: Icc970949e4590aa1ec0c24339f998eaa644f2b10
parent 38a4ab9f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ namespace procpartition {
enum class Partition {
    UNKNOWN = 0,
    SYSTEM,
    SYSTEM_EXT,
    PRODUCT,
    VENDOR,
    ODM
};
+8 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ namespace procpartition {
std::ostream& operator<<(std::ostream& os, Partition p) {
    switch (p) {
        case Partition::SYSTEM: return os << "system";
        case Partition::SYSTEM_EXT: return os << "system_ext";
        case Partition::PRODUCT: return os << "product";
        case Partition::VENDOR: return os << "vendor";
        case Partition::ODM: return os << "odm";
        case Partition::UNKNOWN: // fallthrough
@@ -57,6 +59,12 @@ Partition parsePartition(const std::string& s) {
    if (s == "system") {
        return Partition::SYSTEM;
    }
    if (s == "system_ext") {
        return Partition::SYSTEM_EXT;
    }
    if (s == "product") {
        return Partition::PRODUCT;
    }
    if (s == "vendor") {
        return Partition::VENDOR;
    }