From: krw Date: Wed, 31 Aug 2022 20:52:15 +0000 (+0000) Subject: Replace "newfs_msdos" and "fsck_msdos" with "newfs -t msdos" and "fsck -t X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7a17f38c9c565cae4432481cdcd773b9cd879891;p=openbsd Replace "newfs_msdos" and "fsck_msdos" with "newfs -t msdos" and "fsck -t msdos". Add some missing spaces after "=". Constify the static strings. Prodded a while ago by deraadt@, tweaks from kn@, ok kn@ --- diff --git a/usr.sbin/installboot/efi_installboot.c b/usr.sbin/installboot/efi_installboot.c index e787a19500c..7f422f4c6a6 100644 --- a/usr.sbin/installboot/efi_installboot.c +++ b/usr.sbin/installboot/efi_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efi_installboot.c,v 1.2 2022/02/03 10:25:14 visa Exp $ */ +/* $OpenBSD: efi_installboot.c,v 1.3 2022/08/31 20:52:15 krw Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -144,7 +144,7 @@ md_installboot(int devfd, char *dev) static int create_filesystem(struct disklabel *dl, char part) { - static char *newfsfmt ="/sbin/newfs_msdos %s >/dev/null"; + static const char *newfsfmt = "/sbin/newfs -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; int rslt; @@ -185,7 +185,7 @@ create_filesystem(struct disklabel *dl, char part) static void write_filesystem(struct disklabel *dl, char part) { - static char *fsckfmt = "/sbin/fsck_msdos %s >/dev/null"; + static const char *fsckfmt = "/sbin/fsck -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; char dst[PATH_MAX]; diff --git a/usr.sbin/installboot/i386_installboot.c b/usr.sbin/installboot/i386_installboot.c index c3bf4eaaa44..84dbb8f5899 100644 --- a/usr.sbin/installboot/i386_installboot.c +++ b/usr.sbin/installboot/i386_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i386_installboot.c,v 1.40 2021/07/20 14:51:56 kettenis Exp $ */ +/* $OpenBSD: i386_installboot.c,v 1.41 2022/08/31 20:52:15 krw Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -247,7 +247,7 @@ write_bootblocks(int devfd, char *dev, struct disklabel *dl) int create_filesystem(struct disklabel *dl, char part) { - static char *newfsfmt ="/sbin/newfs_msdos %s >/dev/null"; + static const char *newfsfmt = "/sbin/newfs -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; int rslt; @@ -288,7 +288,7 @@ create_filesystem(struct disklabel *dl, char part) void write_filesystem(struct disklabel *dl, char part) { - static char *fsckfmt = "/sbin/fsck_msdos %s >/dev/null"; + static const char *fsckfmt = "/sbin/fsck -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; char dst[PATH_MAX]; diff --git a/usr.sbin/installboot/macppc_installboot.c b/usr.sbin/installboot/macppc_installboot.c index b3ee6534da5..b14bc276f23 100644 --- a/usr.sbin/installboot/macppc_installboot.c +++ b/usr.sbin/installboot/macppc_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macppc_installboot.c,v 1.4 2021/07/20 14:51:56 kettenis Exp $ */ +/* $OpenBSD: macppc_installboot.c,v 1.5 2022/08/31 20:52:15 krw Exp $ */ /* * Copyright (c) 2011 Joel Sing @@ -116,7 +116,7 @@ md_installboot(int devfd, char *dev) static int create_filesystem(struct disklabel *dl, char part) { - static char *newfsfmt ="/sbin/newfs_msdos %s >/dev/null"; + static const char *newfsfmt = "/sbin/newfs -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; int rslt; @@ -157,7 +157,7 @@ create_filesystem(struct disklabel *dl, char part) static void write_filesystem(struct disklabel *dl, char part) { - static char *fsckfmt = "/sbin/fsck_msdos %s >/dev/null"; + static const char *fsckfmt = "/sbin/fsck -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; char dst[PATH_MAX]; diff --git a/usr.sbin/installboot/octeon_installboot.c b/usr.sbin/installboot/octeon_installboot.c index c1dbf51256a..950e5bb5f18 100644 --- a/usr.sbin/installboot/octeon_installboot.c +++ b/usr.sbin/installboot/octeon_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octeon_installboot.c,v 1.4 2021/07/20 14:51:56 kettenis Exp $ */ +/* $OpenBSD: octeon_installboot.c,v 1.5 2022/08/31 20:52:15 krw Exp $ */ /* * Copyright (c) 2011 Joel Sing @@ -116,7 +116,7 @@ md_installboot(int devfd, char *dev) static int create_filesystem(struct disklabel *dl, char part) { - static char *newfsfmt ="/sbin/newfs_msdos %s >/dev/null"; + static const char *newfsfmt = "/sbin/newfs -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; int rslt; @@ -157,7 +157,7 @@ create_filesystem(struct disklabel *dl, char part) static void write_filesystem(struct disklabel *dl, char part) { - static char *fsckfmt = "/sbin/fsck_msdos %s >/dev/null"; + static char *fsckfmt = "/sbin/fsck -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; char dst[PATH_MAX]; diff --git a/usr.sbin/installboot/powerpc64_installboot.c b/usr.sbin/installboot/powerpc64_installboot.c index 0cd05835dc6..3e83a1bff44 100644 --- a/usr.sbin/installboot/powerpc64_installboot.c +++ b/usr.sbin/installboot/powerpc64_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: powerpc64_installboot.c,v 1.3 2021/07/20 14:51:56 kettenis Exp $ */ +/* $OpenBSD: powerpc64_installboot.c,v 1.4 2022/08/31 20:52:15 krw Exp $ */ /* * Copyright (c) 2011 Joel Sing @@ -123,7 +123,7 @@ md_installboot(int devfd, char *dev) static int create_filesystem(struct disklabel *dl, char part) { - static char *newfsfmt ="/sbin/newfs_msdos %s >/dev/null"; + static const char *newfsfmt = "/sbin/newfs -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; int rslt; @@ -164,7 +164,7 @@ create_filesystem(struct disklabel *dl, char part) static void write_filesystem(struct disklabel *dl, char part) { - static char *fsckfmt = "/sbin/fsck_msdos %s >/dev/null"; + static const char *fsckfmt = "/sbin/fsck -t msdos %s >/dev/null"; struct msdosfs_args args; char cmd[60]; char dir[PATH_MAX];