Rewrite upgrade-simple to C++

This commit is contained in:
Vitaliy Filippov
2022-08-18 01:31:31 +03:00
parent a16263e88c
commit 40d8d65188
10 changed files with 217 additions and 147 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ json11::Json disk_tool_t::add_partitions(vitastor_dev_info_t & devinfo, std::vec
{
script += "+ "+size+" "+std::string(VITASTOR_PART_TYPE)+"\n";
}
if (shell_exec({ "/sbin/sfdisk", devinfo.path }, script, NULL, NULL) != 0)
if (shell_exec({ "/sbin/sfdisk", "--force", devinfo.path }, script, NULL, NULL) != 0)
{
fprintf(stderr, "Failed to add %lu partition(s) with sfdisk\n", sizes.size());
return {};