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

Commit 7af933b6 authored by Tao Bao's avatar Tao Bao
Browse files

Remove the obsolete reference to /file_contexts.

This file no longer exists:
- /file_contexts has been split into plat_file_contexts and
  nonplat_file_contexts since commit
  b236eb6ca204cefcb926e19bd5682f9dcad4021d (system/sepolicy).
- It was named /file_contexts.bin prior to the split.

'-S file_contexts' is also no longer required by e2fsdroid, since commit
2fff6fb036cbbb6dedd7da3d208b312a9038a5ce (external/e2fsprogs). It will
load the file contexts via libselinux.

Test: Trigger the path by performing a data wipe for converting to FBE.
Change-Id: I179939da409e5c0415ae0ea0bf5ddb23f9e6331e
parent 84e4b9fe
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -260,8 +260,6 @@ int format_volume(const char* volume, const char* directory) {
          if (result == 0 && directory != nullptr) {
            const char* e2fsdroid_argv[] = { "/sbin/e2fsdroid_static",
                                             "-e",
                                             "-S",
                                             "/file_contexts",
                                             "-f",
                                             directory,
                                             "-a",
+1 −2
Original line number Diff line number Diff line
@@ -322,8 +322,7 @@ Value* FormatFn(const char* name, State* state, const std::vector<std::unique_pt
      return StringValue(location);
    }

    const char* e2fsdroid_argv[] = { "/sbin/e2fsdroid_static", "-e",   "-S",
                                     "/file_contexts",         "-a",   mount_point.c_str(),
    const char* e2fsdroid_argv[] = { "/sbin/e2fsdroid_static", "-e",   "-a", mount_point.c_str(),
                                     location.c_str(),         nullptr };
    status = exec_cmd(e2fsdroid_argv[0], const_cast<char**>(e2fsdroid_argv));
    if (status != 0) {