Clean rootfs in switch_root

This commit is contained in:
topjohnwu
2020-04-01 23:37:11 -07:00
parent b28668e18d
commit dbfde74c1e
6 changed files with 27 additions and 35 deletions

View File

@@ -258,6 +258,14 @@ int xfstat(int fd, struct stat *buf) {
return ret;
}
int xdup(int fd) {
int ret = dup(fd);
if (ret == -1) {
PLOGE("dup");
}
return ret;
}
int xdup2(int oldfd, int newfd) {
int ret = dup2(oldfd, newfd);
if (ret == -1) {