Implement CLI set (resize, change readonly status) command
This commit is contained in:
@@ -427,6 +427,7 @@ resume_3:
|
||||
exit(1);
|
||||
}
|
||||
this->result = res;
|
||||
parent->ringloop->wakeup();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -478,6 +479,11 @@ std::function<bool(void)> cli_tool_t::start_create(json11::Json cfg)
|
||||
fprintf(stderr, "Invalid syntax for size: %s\n", cfg["size"].string_value().c_str());
|
||||
exit(1);
|
||||
}
|
||||
if (size % 4096)
|
||||
{
|
||||
fprintf(stderr, "Image size should be a multiple of 4096\n");
|
||||
exit(1);
|
||||
}
|
||||
image_creator->size = size;
|
||||
if (image_creator->new_snap != "")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user