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

Commit 887f2892 authored by Ken Sumrall's avatar Ken Sumrall
Browse files

New fstab flags to support more expressive SD card permissions

Bug: 10330128

Change-Id: I41fb178b839487b604762fbc1ccba097d25c7aa0
parent 7b445a8e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ static struct flag_list fs_mgr_flags[] = {
    { "swapprio=",   MF_SWAPPRIO },
    { "zramsize=",   MF_ZRAMSIZE },
    { "verify",      MF_VERIFY },
    { "noemulatedsd", MF_NOEMULATEDSD },
    { "defaults",    0 },
    { 0,             0 },
};
@@ -931,3 +932,8 @@ int fs_mgr_is_encryptable(struct fstab_rec *fstab)
{
    return fstab->fs_mgr_flags & MF_CRYPT;
}

int fs_mgr_is_noemulatedsd(struct fstab_rec *fstab)
{
    return fstab->fs_mgr_flags & MF_NOEMULATEDSD;
}
+6 −0
Original line number Diff line number Diff line
@@ -72,6 +72,12 @@
#define MF_SWAPPRIO     0x80
#define MF_ZRAMSIZE     0x100
#define MF_VERIFY       0x200
/*
 * There is no emulated sdcard daemon running on /data/media on this device,
 * so treat the physical SD card as the only external storage device,
 * a la the Nexus One.
 */
#define MF_NOEMULATEDSD 0x400

#define DM_BUF_SIZE 4096

+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ struct fstab_rec *fs_mgr_get_entry_for_mount_point(struct fstab *fstab, const ch
int fs_mgr_is_voldmanaged(struct fstab_rec *fstab);
int fs_mgr_is_nonremovable(struct fstab_rec *fstab);
int fs_mgr_is_encryptable(struct fstab_rec *fstab);
int fs_mgr_is_noemulatedsd(struct fstab_rec *fstab);
int fs_mgr_swapon_all(struct fstab *fstab);
#ifdef __cplusplus
}