-/* $OpenBSD: efi_installboot.c,v 1.5 2022/09/09 15:53:16 kn Exp $ */
+/* $OpenBSD: efi_installboot.c,v 1.6 2022/09/14 16:43:00 kn Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <err.h>
#include <errno.h>
warnx("disklabel type unknown");
part = findgptefisys(devfd, &dl);
- if (part == -1)
- part = findmbrfat(devfd, &dl);
if (part != -1) {
- if (create_filesystem(&dl, (char)part) == -1)
- exit(1);
+ create_filesystem(&dl, (char)part);
+ return;
+ }
+
+ part = findmbrfat(devfd, &dl);
+ if (part != -1) {
+ create_filesystem(&dl, (char)part);
+ return;
}
}
warn("system('%s') failed", cmd);
return rslt;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt))
- return -1;
}
return 0;
warn("system('%s') failed", cmd);
goto rmdir;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt)) {
- rslt = -1;
- goto rmdir;
- }
if (mount(MOUNT_MSDOS, dst, 0, &args) == -1) {
/* Try newfs'ing it. */
rslt = create_filesystem(dl, part);
-/* $OpenBSD: i386_installboot.c,v 1.42 2022/09/09 15:53:16 kn Exp $ */
+/* $OpenBSD: i386_installboot.c,v 1.43 2022/09/14 16:43:00 kn Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/time.h>
-#include <sys/wait.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
part = findgptefisys(devfd, &dl);
if (part != -1) {
- if (create_filesystem(&dl, (char)part) == -1)
- exit(1);
+ create_filesystem(&dl, (char)part);
+ return;
}
}
warn("system('%s') failed", cmd);
return rslt;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt))
- return -1;
}
return 0;
warn("system('%s') failed", cmd);
goto rmdir;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt)) {
- rslt = -1;
- goto rmdir;
- }
if (mount(MOUNT_MSDOS, dst, 0, &args) == -1) {
/* Try newfs'ing it. */
rslt = create_filesystem(dl, part);
-/* $OpenBSD: loongson_installboot.c,v 1.6 2022/09/11 07:38:33 miod Exp $ */
+/* $OpenBSD: loongson_installboot.c,v 1.7 2022/09/14 16:43:00 kn Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <err.h>
#include <errno.h>
warn("system('%s') failed", cmd);
goto rmdir;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt)) {
- rslt = -1;
- goto rmdir;
- }
if (mount(MOUNT_EXT2FS, dst, 0, &args) == -1) {
/* Try newfs'ing it. */
rslt = snprintf(cmd, sizeof(cmd), newfsfmt,
warn("system('%s') failed", cmd);
goto rmdir;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt)) {
- rslt = -1;
- goto rmdir;
- }
rslt = mount(MOUNT_EXT2FS, dst, 0, &args);
if (rslt == -1) {
warn("unable to mount ext2fs partition");
-/* $OpenBSD: macppc_installboot.c,v 1.7 2022/09/09 15:53:16 kn Exp $ */
+/* $OpenBSD: macppc_installboot.c,v 1.8 2022/09/14 16:43:00 kn Exp $ */
/*
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <err.h>
#include <errno.h>
part = findmbrfat(devfd, &dl);
if (part != -1) {
- if (create_filesystem(&dl, (char)part) == -1)
- exit(1);
+ create_filesystem(&dl, (char)part);
+ return;
}
}
warn("system('%s') failed", cmd);
return rslt;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt))
- return -1;
}
return 0;
warn("system('%s') failed", cmd);
goto rmdir;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt)) {
- rslt = -1;
- goto rmdir;
- }
if (mount(MOUNT_MSDOS, dst, 0, &args) == -1) {
/* Try newfs'ing it. */
rslt = create_filesystem(dl, part);
-/* $OpenBSD: octeon_installboot.c,v 1.6 2022/09/09 15:53:16 kn Exp $ */
+/* $OpenBSD: octeon_installboot.c,v 1.7 2022/09/14 16:43:00 kn Exp $ */
/*
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <err.h>
#include <errno.h>
part = findmbrfat(devfd, &dl);
if (part != -1) {
- if (create_filesystem(&dl, (char)part) == -1)
- exit(1);
+ create_filesystem(&dl, (char)part);
+ return;
}
}
warn("system('%s') failed", cmd);
return rslt;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt))
- return -1;
}
return 0;
warn("system('%s') failed", cmd);
goto rmdir;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt)) {
- rslt = -1;
- goto rmdir;
- }
if (mount(MOUNT_MSDOS, dst, 0, &args) == -1) {
/* Try newfs'ing it. */
rslt = create_filesystem(dl, part);
-/* $OpenBSD: powerpc64_installboot.c,v 1.5 2022/09/09 15:53:16 kn Exp $ */
+/* $OpenBSD: powerpc64_installboot.c,v 1.6 2022/09/14 16:43:00 kn Exp $ */
/*
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <err.h>
#include <errno.h>
part = findmbrfat(devfd, &dl);
if (part != -1) {
- if (create_filesystem(&dl, (char)part) == -1)
- exit(1);
+ create_filesystem(&dl, (char)part);
+ return;
}
}
warn("system('%s') failed", cmd);
return rslt;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt))
- return -1;
}
return 0;
warn("system('%s') failed", cmd);
goto rmdir;
}
- if (WIFEXITED(rslt) && WEXITSTATUS(rslt)) {
- rslt = -1;
- goto rmdir;
- }
if (mount(MOUNT_MSDOS, dir, 0, &args) == -1) {
/* Try newfs'ing it. */
rslt = create_filesystem(dl, part);