OSDN Git Service

vold3: fix SDCARD=xxx function for nvme pie-x86
authoryouling257 <youling257@gmail.com>
Mon, 14 Dec 2020 04:57:49 +0000 (12:57 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 17 Dec 2020 14:02:28 +0000 (22:02 +0800)
main.cpp

index d3b28d8..008ca80 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -288,6 +288,10 @@ static int process_config(VolumeManager* vm, bool* has_adoptable, bool* has_quot
                             // exclude the last 'p'
                             sdcard = sdcard.substr(0, pos - 1);
                         }
+                        if (sdcard.find("nvme") != std::string::npos) {
+                            // exclude the last 'p'
+                            sdcard = sdcard.substr(0, pos - 1);
+                        }
                     }
                 }
                 vm->addDiskSource(std::shared_ptr<VolumeManager::DiskSource>(