svn commit: r190932 - head/sbin/newfs_msdos
Ed Schouten
ed at FreeBSD.org
Sat Apr 11 14:56:30 UTC 2009
Author: ed
Date: Sat Apr 11 14:56:29 2009
New Revision: 190932
URL: http://svn.freebsd.org/changeset/base/190932
Log:
Do not prepend /dev/ when -C is used.
Submitted by: Christoph Mallon <christoph mallon gmx de>
Modified:
head/sbin/newfs_msdos/newfs_msdos.8
head/sbin/newfs_msdos/newfs_msdos.c
Modified: head/sbin/newfs_msdos/newfs_msdos.8
==============================================================================
--- head/sbin/newfs_msdos/newfs_msdos.8 Sat Apr 11 14:53:32 2009 (r190931)
+++ head/sbin/newfs_msdos/newfs_msdos.8 Sat Apr 11 14:56:29 2009 (r190932)
@@ -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
Modified: head/sbin/newfs_msdos/newfs_msdos.c
==============================================================================
--- head/sbin/newfs_msdos/newfs_msdos.c Sat Apr 11 14:53:32 2009 (r190931)
+++ head/sbin/newfs_msdos/newfs_msdos.c Sat Apr 11 14:56:29 2009 (r190932)
@@ -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);
More information about the svn-src-head
mailing list