Date: Sat, 11 Apr 2009 14:56:29 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190932 - head/sbin/newfs_msdos Message-ID: <200904111456.n3BEuT4C089740@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904111456.n3BEuT4C089740>