}
if (unshare(CLONE_NEWNS) < 0)
- exit(1);
+ _exit(EXIT_FAILURE);
if (detect_shared_rootfs())
if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL)) {
if (ret < 0) {
ERROR("Failed to mount \"%s\" onto \"%s\" to detect FSType", srcdev,
bdev->dest);
- exit(1);
+ _exit(EXIT_FAILURE);
}
l = linkderef(srcdev, devpath);
if (!l)
- exit(1);
+ _exit(EXIT_FAILURE);
f = fopen("/proc/self/mounts", "r");
if (!f)
- exit(1);
+ _exit(EXIT_FAILURE);
while (getline(&line, &linelen, f) != -1) {
sp1 = strchr(line, ' ');
if (!sp1)
- exit(1);
+ _exit(EXIT_FAILURE);
*sp1 = '\0';
if (strcmp(line, l))
sp2 = strchr(sp1 + 1, ' ');
if (!sp2)
- exit(1);
+ _exit(EXIT_FAILURE);
*sp2 = '\0';
sp3 = strchr(sp2 + 1, ' ');
if (!sp3)
- exit(1);
+ _exit(EXIT_FAILURE);
*sp3 = '\0';
sp2++;
if (write(p[1], sp2, strlen(sp2)) != strlen(sp2))
- exit(1);
+ _exit(EXIT_FAILURE);
- exit(0);
+ _exit(EXIT_SUCCESS);
}
- exit(1);
+ _exit(EXIT_FAILURE);
}
int do_mkfs_exec_wrapper(void *args)