summaryrefslogtreecommitdiff
path: root/sbin/newfs_msdos
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/newfs_msdos')
-rw-r--r--sbin/newfs_msdos/newfs_msdos.814
-rw-r--r--sbin/newfs_msdos/newfs_msdos.c4
2 files changed, 15 insertions, 3 deletions
diff --git a/sbin/newfs_msdos/newfs_msdos.8 b/sbin/newfs_msdos/newfs_msdos.8
index fe5a67a97d3..5c089b11109 100644
--- a/sbin/newfs_msdos/newfs_msdos.8
+++ b/sbin/newfs_msdos/newfs_msdos.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: newfs_msdos.8,v 1.22 2007/09/28 09:57:01 jmc Exp $
+.\" $OpenBSD: newfs_msdos.8,v 1.23 2009/07/27 18:11:07 halex Exp $
.\"
.\" Copyright (c) 1998 Robert Nordier
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD: src/sbin/newfs_msdos/newfs_msdos.8,v 1.6 1999/08/28 00:13:52 peter Exp $
.\"
-.Dd $Mdocdate: September 28 2007 $
+.Dd $Mdocdate: July 27 2009 $
.Dt NEWFS_MSDOS 8
.Os
.Sh NAME
@@ -71,6 +71,16 @@ entry
.Ar disktype
to determine geometry, if required.
.Pp
+The
+.Ar special
+file should be a raw device,
+for example
+.Pa /dev/rsd0i ;
+if a relative path like
+.Pa sd0i
+is specified,
+the corresponding raw device is used.
+.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl a Ar FAT-size
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c
index be760b4b510..16851ff45bf 100644
--- a/sbin/newfs_msdos/newfs_msdos.c
+++ b/sbin/newfs_msdos/newfs_msdos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs_msdos.c,v 1.17 2007/09/28 09:57:01 jmc Exp $ */
+/* $OpenBSD: newfs_msdos.c,v 1.18 2009/07/27 18:11:07 halex Exp $ */
/*
* Copyright (c) 1998 Robert Nordier
@@ -347,6 +347,8 @@ main(int argc, char *argv[])
err(1, "%s", fname);
if (!opt_N)
check_mounted(fname, sb.st_mode);
+ if (S_ISBLK(sb.st_mode))
+ errx(1, "%s: block device", fname);
if (!S_ISCHR(sb.st_mode))
warnx("warning: %s is not a character device", fname);
memset(&bpb, 0, sizeof(bpb));