[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7
am: 98bb129cd3
am: 0c5a0d65c9
am: 7e51f8d0c4
am: 53fe89bbad
am: 5716ee6d7a
am: 4de0e883d0
am: a7946bf9c6
Change-Id: I831bc503b1fdcf5a6a0c31ac0ded46d301c410ef
This commit is contained in:
commit
635193ab36
1 changed files with 3 additions and 3 deletions
|
@ -211,17 +211,17 @@ static status_t readMetadata(const std::string& path, std::string& fsType,
|
||||||
for (auto line : output) {
|
for (auto line : output) {
|
||||||
// Extract values from blkid output, if defined
|
// Extract values from blkid output, if defined
|
||||||
const char* cline = line.c_str();
|
const char* cline = line.c_str();
|
||||||
char* start = strstr(cline, "TYPE=");
|
char* start = strstr(cline, "TYPE=\"");
|
||||||
if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
|
if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
|
||||||
fsType = value;
|
fsType = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
start = strstr(cline, "UUID=");
|
start = strstr(cline, "UUID=\"");
|
||||||
if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
|
if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
|
||||||
fsUuid = value;
|
fsUuid = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
start = strstr(cline, "LABEL=");
|
start = strstr(cline, "LABEL=\"");
|
||||||
if (start != nullptr && sscanf(start + 6, "\"%127[^\"]\"", value) == 1) {
|
if (start != nullptr && sscanf(start + 6, "\"%127[^\"]\"", value) == 1) {
|
||||||
fsLabel = value;
|
fsLabel = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue