Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274-aa7d-e88e8cceb407 am: 9a35ab6a4f

am: f707f1bb88

Change-Id: I4d9e269f34cab043a7c437781187d9a47e0fa652
This commit is contained in:
Jeff Sharkey 2018-06-01 15:31:32 -07:00 committed by android-build-merger
commit 2b9a343319

View file

@ -213,17 +213,17 @@ static status_t readMetadata(const std::string& path, std::string& fsType,
for (const auto& line : output) {
// Extract values from blkid output, if defined
const char* cline = line.c_str();
const char* start = strstr(cline, "TYPE=");
const char* start = strstr(cline, "TYPE=\"");
if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
fsType = value;
}
start = strstr(cline, "UUID=");
start = strstr(cline, "UUID=\"");
if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
fsUuid = value;
}
start = strstr(cline, "LABEL=");
start = strstr(cline, "LABEL=\"");
if (start != nullptr && sscanf(start + 6, "\"%127[^\"]\"", value) == 1) {
fsLabel = value;
}