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

Commit b9be43ae authored by Eric Biggers's avatar Eric Biggers Committed by Gerrit Code Review
Browse files

Merge "fs_mgr_fstab: allow fileencryption without equals sign"

parents 3a079130 cc4a15b9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -242,7 +242,9 @@ bool ParseFsMgrFlags(const std::string& flags, FstabEntry* entry) {
                    LWARNING << "Warning: zramsize= flag malformed: " << arg;
                }
            }
        } else if (StartsWith(flag, "fileencryption=")) {
        } else if (StartsWith(flag, "fileencryption=") || flag == "fileencryption") {
            // "fileencryption" enables file-based encryption.  It's normally followed by an = and
            // then the encryption options.  But that can be omitted to use the default options.
            ParseFileEncryption(arg, entry);
        } else if (StartsWith(flag, "max_comp_streams=")) {
            if (!ParseInt(arg, &entry->max_comp_streams)) {
+1 −0
Original line number Diff line number Diff line
@@ -497,6 +497,7 @@ source none1 swap defaults fileencryption=,keydirectory=,length=,sw
    EXPECT_EQ("none0", entry->mount_point);
    {
        FstabEntry::FsMgrFlags flags = {};
        flags.file_encryption = true;
        EXPECT_TRUE(CompareFlags(flags, entry->fs_mgr_flags));
    }
    EXPECT_EQ("", entry->metadata_key_dir);