Android7.0 sdcard預留100M

diff --git a/system/core/sdcard/sdcard.c b/system/core/sdcard/sdcard.c
index 4b362a6..09672ba 100755
--- a/system/core/sdcard/sdcard.c
+++ b/system/core/sdcard/sdcard.c
@@ -1951,13 +1951,14 @@ static void run(const char* source_path, const char* label, uid_t uid,
     exit(1);
 }
 
+#define SDCARDFS_RESERVED_MB 100
 static int sdcardfs_setup(const char *source_path, const char *dest_path, uid_t fsuid,
                         gid_t fsgid, bool multi_user, userid_t userid, gid_t gid, mode_t mask) {
     char opts[256];
 
     snprintf(opts, sizeof(opts),
-            "fsuid=%d,fsgid=%d,%smask=%d,userid=%d,gid=%d",
-            fsuid, fsgid, multi_user?"multiuser,":"", mask, userid, gid);
+            "fsuid=%d,fsgid=%d,%smask=%d,userid=%d,gid=%d,reserved_mb=%d",
+            fsuid, fsgid, multi_user?"multiuser,":"", mask, userid, gid,SDCARDFS_RESERVED_MB);
 
     if (mount(source_path, dest_path, "sdcardfs",
                         MS_NOSUID | MS_NODEV | MS_NOEXEC | MS_NOATIME, opts) != 0) {
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章