summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/newfs_msdos/newfs_msdos.810
-rw-r--r--sbin/newfs_msdos/newfs_msdos.c2
2 files changed, 7 insertions, 5 deletions
diff --git a/sbin/newfs_msdos/newfs_msdos.8 b/sbin/newfs_msdos/newfs_msdos.8
index 213b09d..a48cf70 100644
--- a/sbin/newfs_msdos/newfs_msdos.8
+++ b/sbin/newfs_msdos/newfs_msdos.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 8, 2007
+.Dd April 11, 2009
.Dt NEWFS_MSDOS 8
.Os
.Sh NAME
@@ -72,9 +72,11 @@ to determine geometry, if required.
If
.Ar special
does not contain a
-.Ar / ,
-it is assumed to be a device name and
-.Ar /dev
+.Ar /
+and
+.Fl C
+is not used, it is assumed to be a device name and
+.Ar /dev/
is prepended to the name to construct the actual device name.
To work a file in the current directory use
.Ar ./filename
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c
index 091cf4c..f09578a 100644
--- a/sbin/newfs_msdos/newfs_msdos.c
+++ b/sbin/newfs_msdos/newfs_msdos.c
@@ -349,7 +349,7 @@ main(int argc, char *argv[])
if (argc < 1 || argc > 2)
usage();
fname = *argv++;
- if (!strchr(fname, '/')) {
+ if (!opt_create && !strchr(fname, '/')) {
snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
if (!(fname = strdup(buf)))
err(1, NULL);
OpenPOWER on IntegriCloud