summaryrefslogtreecommitdiff
path: root/newfs_msdos.c
diff options
context:
space:
mode:
Diffstat (limited to 'newfs_msdos.c')
-rw-r--r--newfs_msdos.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/newfs_msdos.c b/newfs_msdos.c
index cd03164..bac250e 100644
--- a/newfs_msdos.c
+++ b/newfs_msdos.c
@@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
- "$FreeBSD: head/sbin/newfs_msdos/newfs_msdos.c 335189 2018-06-15 06:03:40Z delphij $";
+ "$FreeBSD$";
#endif /* not lint */
#include <sys/param.h>
@@ -178,18 +178,17 @@ main(int argc, char *argv[])
argv += optind;
if (argc < 1 || argc > 2)
usage();
- if (o.align) {
- if (o.hidden_sectors_set)
- errx(1, "align (-A) is incompatible with -r");
- }
+ if (o.align) {
+ if (o.reserved_sectors)
+ errx(1, "align (-A) is incompatible with -r");
+ }
fname = *argv++;
if (!o.create_size && !strchr(fname, '/')) {
snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
- if (!(fname = strdup(buf)))
- err(1, NULL);
+ fname = buf;
}
dtype = *argv;
- return !!mkfs_msdos(fname, dtype, &o);
+ exit(!!mkfs_msdos(fname, dtype, &o));
}
/*