Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-vold: Commit

system/vold


Commit MetaInfo

Revisiónd764fe5891d6518e3ed130410a4d0276405aacf6 (tree)
Tiempo2017-05-07 02:29:55
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

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.

Cambiar Resumen

Diferencia

--- 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
@@ -542,7 +543,15 @@ bool IsFilesystemSupported(const std::string& fsType) {
542543 supported.append("fuse\tntfs\n"
543544 "fuse\texfat\n");
544545
545- return supported.find(fsType + "\n") != std::string::npos;
546+ if (supported.find(fsType + "\n") != std::string::npos) {
547+ return true;
548+ }
549+
550+ // Check if there is a filesystem module available
551+ char fs[PATH_MAX];
552+ get_default_mod_path(fs);
553+ supported = StringPrintf("%skernel/fs/%s", fs, fsType.c_str());
554+ return !access(supported.c_str(), F_OK);
546555 }
547556
548557 status_t WipeBlockDevice(const std::string& path) {
Show on old repository browser