• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修訂a24f3a00d33cd10fc9623787af4b866e203f200b (tree)
時間2010-04-14 19:19:54
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

vold: add fat partition type detection, and fix a crash bug

Change Summary

差異

--- a/vold/volmgr.c
+++ b/vold/volmgr.c
@@ -1157,7 +1157,7 @@ static int _volmgr_start(volume_t *vol, blkdev_t *dev)
11571157 break;
11581158 }
11591159
1160- if (!fs) {
1160+ if (!fs->name) {
11611161 LOGE("No supported filesystems on %d:%d", dev->major, dev->minor);
11621162 volume_setstate(vol, volstate_nofs);
11631163 return -ENODATA;
--- a/vold/volmgr_vfat.c
+++ b/vold/volmgr_vfat.c
@@ -36,7 +36,18 @@ int vfat_identify(blkdev_t *dev)
3636 #if VFAT_DEBUG
3737 LOG_VOL("vfat_identify(%d:%d):", dev->major, dev->minor);
3838 #endif
39- return 0; // XXX: Implement
39+ switch (dev->part_type) {
40+ case 0x1:
41+ case 0x4:
42+ case 0x6:
43+ case 0xb:
44+ case 0xc:
45+ case 0xe:
46+ case 0xf:
47+ return 0;
48+ default:
49+ return -ENODATA;
50+ }
4051 }
4152
4253 const char *vfat_parttype(blkdev_t *dev)
@@ -164,8 +175,8 @@ int vfat_mount(blkdev_t *dev, volume_t *vol, boolean safe_mode)
164175 }
165176
166177 #if VFAT_DEBUG
167- LOG_VOL("vfat_mount(%s, %d:%d): mount rc = %d", dev->major,k dev->minor,
168- vol->mount_point, rc);
178+ LOG_VOL("vfat_mount(%s, %d:%d): mount rc = %d", vol->mount_point,
179+ dev->major, dev->minor, rc);
169180 #endif
170181 free (devpath);
171182 return rc;