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

Commit 15cd1cd8 authored by Yifan Hong's avatar Yifan Hong Committed by Gerrit Code Review
Browse files

Merge changes from topic "e2fsprogs_vendor_ramdisk"

* changes:
  fs_config Add first_stage_ramdisk/system/bin/linker[64]
  libsparse: make vendor_ramdisk_available.
  init: don't abort if directory already exists
parents cf539f16 c7ed02f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ void PrepareSwitchRoot() {

    auto dst_dir = android::base::Dirname(dst);
    std::error_code ec;
    if (!fs::create_directories(dst_dir, ec)) {
    if (!fs::create_directories(dst_dir, ec) && !!ec) {
        LOG(FATAL) << "Cannot create " << dst_dir << ": " << ec.message();
    }
    if (rename(src, dst) != 0) {
@@ -315,7 +315,7 @@ int FirstStageMain(int argc, char** argv) {
        std::string dest = GetRamdiskPropForSecondStage();
        std::string dir = android::base::Dirname(dest);
        std::error_code ec;
        if (!fs::create_directories(dir, ec)) {
        if (!fs::create_directories(dir, ec) && !!ec) {
            LOG(FATAL) << "Can't mkdir " << dir << ": " << ec.message();
        }
        if (!fs::copy_file(kBootImageRamdiskProp, dest, ec)) {
+6 −1
Original line number Diff line number Diff line
@@ -203,9 +203,14 @@ static const struct fs_path_config android_files[] = {
                                           CAP_MASK_LONG(CAP_SETGID),
                                              "system/bin/simpleperf_app_runner" },
    { 00755, AID_ROOT,      AID_ROOT,      0, "first_stage_ramdisk/system/bin/e2fsck" },
    { 00755, AID_ROOT,      AID_ROOT,      0, "first_stage_ramdisk/system/bin/tune2fs" },
#ifdef __LP64__
    { 00755, AID_ROOT,      AID_ROOT,      0, "first_stage_ramdisk/system/bin/linker64" },
#else
    { 00755, AID_ROOT,      AID_ROOT,      0, "first_stage_ramdisk/system/bin/linker" },
#endif
    { 00755, AID_ROOT,      AID_ROOT,      0, "first_stage_ramdisk/system/bin/resize2fs" },
    { 00755, AID_ROOT,      AID_ROOT,      0, "first_stage_ramdisk/system/bin/snapuserd" },
    { 00755, AID_ROOT,      AID_ROOT,      0, "first_stage_ramdisk/system/bin/tune2fs" },
    // generic defaults
    { 00755, AID_ROOT,      AID_ROOT,      0, "bin/*" },
    { 00640, AID_ROOT,      AID_SHELL,     0, "fstab.*" },
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ cc_library {
    name: "libsparse",
    host_supported: true,
    ramdisk_available: true,
    vendor_ramdisk_available: true,
    recovery_available: true,
    unique_host_soname: true,
    vendor_available: true,