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

@@ -11,13 +11,10 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/sysmacros.h>
#include <vector>
#include <logging.h>
#include <utils.h>
using namespace std;
unsigned get_shell_uid() {
struct passwd* ppwd = getpwnam("shell");
if (nullptr == ppwd)
@@ -195,8 +192,7 @@ int exec_command(exec_t &exec) {
exit(-1);
}
int exec_command_sync(const char **argv) {
exec_t exec { .argv = argv };
int exec_command_sync(exec_t &exec) {
int pid, status;
pid = exec_command(exec);
if (pid < 0)