Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-vold: コミット

system/vold


コミットメタ情報

リビジョンaeff1fb46904953c060f9599aa465739a9beafbd (tree)
日時2017-09-12 19:40:49
作者Chih-Wei Huang <cwhuang@linu...>
コミッターChih-Wei Huang

ログメッセージ

vold3: check supported filesystem modules

If there is a filesystem module of the requested type,
it should be considered supported.

Note the kernel will auto load the filesystem module
on mounting by modprobe.

変更サマリ

差分

--- a/Utils.cpp
+++ b/Utils.cpp
@@ -26,6 +26,7 @@
2626
2727 #include <cutils/fs.h>
2828 #include <cutils/properties.h>
29+#include <cutils/probe_module.h>
2930 #include <private/android_filesystem_config.h>
3031 #include <logwrap/logwrap.h>
3132
@@ -519,7 +520,15 @@ bool IsFilesystemSupported(const std::string& fsType) {
519520 supported.append("fuse\tntfs\n"
520521 "fuse\texfat\n");
521522
522- return supported.find(fsType + "\n") != std::string::npos;
523+ if (supported.find(fsType + "\n") != std::string::npos) {
524+ return true;
525+ }
526+
527+ // Check if there is a filesystem module available
528+ char fs[PATH_MAX];
529+ get_default_mod_path(fs);
530+ supported = StringPrintf("%skernel/fs/%s", fs, fsType.c_str());
531+ return !access(supported.c_str(), F_OK);
523532 }
524533
525534 status_t WipeBlockDevice(const std::string& path) {
旧リポジトリブラウザで表示