Migrate EXT4 images instead of removing them

This commit is contained in:
topjohnwu
2019-02-12 16:13:31 -05:00
parent ed027ec3ee
commit 0f55fcafe8
3 changed files with 40 additions and 16 deletions

View File

@ -162,11 +162,17 @@ int exec_command(exec_t &exec, Args &&...args) {
exec.argv = argv;
return exec_command(exec);
}
int exec_command_sync(const char **argv);
int exec_command_sync(exec_t &exec);
template <class ...Args>
int exec_command_sync(exec_t &exec, Args &&...args) {
const char *argv[] = {args..., nullptr};
exec.argv = argv;
return exec_command_sync(exec);
}
template <class ...Args>
int exec_command_sync(Args &&...args) {
const char *argv[] = {args..., nullptr};
return exec_command_sync(argv);
exec_t exec{};
return exec_command_sync(exec, args...);
}
#endif