Make get_parent_device return full path

This commit is contained in:
Vitaliy Filippov
2024-10-12 13:44:52 +03:00
parent ebd616e42f
commit d27a8bdabc
3 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ int disk_tool_t::prepare_one(std::map<std::string, std::string> options, int is_
return 1;
}
if (i == 0 && is_hdd == -1)
is_hdd = trim(read_file("/sys/block/"+parent_dev+"/queue/rotational")) == "1";
is_hdd = trim(read_file("/sys/block/"+parent_dev.substr(5)+"/queue/rotational")) == "1";
if (check_existing_partition(dev) != 0)
return 1;
}