Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
...@@ -92,6 +92,7 @@ static struct flag_list fs_mgr_flags[] = { ...@@ -92,6 +92,7 @@ static struct flag_list fs_mgr_flags[] = {
{ "swapprio=", MF_SWAPPRIO }, { "swapprio=", MF_SWAPPRIO },
{ "zramsize=", MF_ZRAMSIZE }, { "zramsize=", MF_ZRAMSIZE },
{ "verify", MF_VERIFY }, { "verify", MF_VERIFY },
{ "noemulatedsd", MF_NOEMULATEDSD },
{ "defaults", 0 }, { "defaults", 0 },
{ 0, 0 }, { 0, 0 },
}; };
...@@ -931,3 +932,8 @@ int fs_mgr_is_encryptable(struct fstab_rec *fstab) ...@@ -931,3 +932,8 @@ int fs_mgr_is_encryptable(struct fstab_rec *fstab)
{ {
return fstab->fs_mgr_flags & MF_CRYPT; return fstab->fs_mgr_flags & MF_CRYPT;
} }
int fs_mgr_is_noemulatedsd(struct fstab_rec *fstab)
{
return fstab->fs_mgr_flags & MF_NOEMULATEDSD;
}
...@@ -72,6 +72,12 @@ ...@@ -72,6 +72,12 @@
#define MF_SWAPPRIO 0x80 #define MF_SWAPPRIO 0x80
#define MF_ZRAMSIZE 0x100 #define MF_ZRAMSIZE 0x100
#define MF_VERIFY 0x200 #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 #define DM_BUF_SIZE 4096
......
...@@ -62,6 +62,7 @@ struct fstab_rec *fs_mgr_get_entry_for_mount_point(struct fstab *fstab, const ch ...@@ -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_voldmanaged(struct fstab_rec *fstab);
int fs_mgr_is_nonremovable(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_encryptable(struct fstab_rec *fstab);
int fs_mgr_is_noemulatedsd(struct fstab_rec *fstab);
int fs_mgr_swapon_all(struct fstab *fstab); int fs_mgr_swapon_all(struct fstab *fstab);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment