Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2013 16:39:38 GMT
From:      Alan Somers <asomers@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/183207: [patch] sysutils/mkfile-1.1.1 no longer accepts the default unit suffix
Message-ID:  <201310221639.r9MGdcsN063716@oldred.freebsd.org>
Resent-Message-ID: <201310221640.r9MGe03N037644@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183207
>Category:       ports
>Synopsis:       [patch] sysutils/mkfile-1.1.1 no longer accepts the default unit suffix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 22 16:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Alan Somers
>Release:        9.1 and 10.0-Alpha5
>Organization:
>Environment:
# uname -a
FreeBSD alans-fbsd10 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #1 r256272M: Thu Oct 10 14:48:02 MDT 2013     alans@ns1.eng.sldomain.com:/vmpool/obj/usr/home/alans/freebsd/base/projects/zfsd/head/sys/GENERIC  amd64
>Description:
According to the man page, mkfile(8) will assume that the first argument is in units of bytes unless the user specifies an explicit argument.  The man page matched the behavior of mkfile-1.1.  However, mkfile-1.1.1 no longer accepts an empty unit size suffix.
>How-To-Repeat:
# ./mkfile 100 /tmp/bar
100: Invalid argument
>Fix:
Apply the attached patch to mkfile.c.

Patch attached with submission follows:

--- mkfile.c.orig	2013-06-21 18:19:30.000000000 -0600
+++ mkfile.c	2013-10-22 10:06:39.089650473 -0600
@@ -96,6 +96,9 @@
 	case 'b':	/* Blocks. */
 		sh = 9;
 		break;
+	case '\0':	/* Implicit bytes */
+		sh = 0;
+		break;
 	default:	/* Unknown... */
 		errno = EINVAL;
 		return 0;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310221639.r9MGdcsN063716>