From nobody@FreeBSD.org  Tue Jan 28 12:10:19 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 8D219DBF
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Jan 2014 12:10:19 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 79D0315EB
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Jan 2014 12:10:19 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0SCAJi7001171
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Jan 2014 12:10:19 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0SCAJe8001165;
	Tue, 28 Jan 2014 12:10:19 GMT
	(envelope-from nobody)
Message-Id: <201401281210.s0SCAJe8001165@oldred.freebsd.org>
Date: Tue, 28 Jan 2014 12:10:19 GMT
From: "Arnot B&#283;lohlvek" <belzebubc@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mount_udf always return "Invalid argument".
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         186193
>Category:       bin
>Synopsis:       [patch] mount_udf(8) always return "Invalid argument".
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brueffer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 28 12:20:00 UTC 2014
>Closed-Date:    Mon Mar 03 12:09:50 CET 2014
>Last-Modified:  Mon Mar 03 12:09:50 CET 2014
>Originator:     Arnot B&#283;lohlvek
>Release:        Freebsd 10.0-STABLE
>Organization:
FJFI &#268;VUT Prague, Czech Republic
>Environment:
FreeBSD Helmut2.2a 10.0-STABLE FreeBSD 10.0-STABLE #0: Wed Jan 22 18:19:17 CET 2014     belzebub@Helmut2.2a:/usr/obj/usr/src/sys/H2CORE  amd64

>Description:
"mount_udf special node" always return "Invalid argument", also if the special does not exist or is true udf fs. Finally, no udf dvd or image can be mounted.
>How-To-Repeat:
mount_udf /dev/anything /cdrom
>Fix:
Problem is caused by little programming error in src/sbin/mount_udf/mount_udf.c.

Sending patch for this file...

Patch attached with submission follows:

--- mount_udf.c.orig	2014-01-28 12:52:33.000000000 +0100
+++ mount_udf.c	2014-01-28 12:53:44.000000000 +0100
@@ -77,9 +77,9 @@
 	char fstype[] = "udf";
 	struct iovec *iov;
 	char *cs_disk, *cs_local, *dev, *dir;
-	int ch, i, iovlen, mntflags, udf_flags, verbose;
+	int ch, iovlen, mntflags, udf_flags, verbose;
 
-	i = iovlen = mntflags = udf_flags = verbose = 0;
+	iovlen = mntflags = udf_flags = verbose = 0;
 	cs_disk = cs_local = NULL;
 	iov = NULL;
 	while ((ch = getopt(argc, argv, "o:vC:")) != -1)
@@ -129,7 +129,7 @@
 		build_iovec(&iov, &iovlen, "cs_disk", cs_disk, (size_t)-1);
 		build_iovec(&iov, &iovlen, "cs_local", cs_local, (size_t)-1);
 	}
-	if (nmount(iov, i, mntflags) < 0)
+	if (nmount(iov, iovlen, mntflags) < 0)
 		err(1, "%s", dev);
 	exit(0);
 }


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: brueffer 
State-Changed-When: Tue Feb 4 22:16:26 CET 2014 
State-Changed-Why:  
Patch committed to HEAD, merge to 10-STABLE pending. 


Responsible-Changed-From-To: freebsd-bugs->brueffer 
Responsible-Changed-By: brueffer 
Responsible-Changed-When: Tue Feb 4 22:16:26 CET 2014 
Responsible-Changed-Why:  
MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186193 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/186193: commit references a PR
Date: Tue,  4 Feb 2014 21:15:22 +0000 (UTC)

 Author: brueffer
 Date: Tue Feb  4 21:15:15 2014
 New Revision: 261496
 URL: http://svnweb.freebsd.org/changeset/base/261496
 
 Log:
   Unbreak mount_udf by passing the correct iovec length into
   nmount().  This has been broken since r247856.
   
   PR:		bin/186193
   Submitted by:	Arnot Belohlavek
   MFC after:	1 week
 
 Modified:
   head/sbin/mount_udf/mount_udf.c
 
 Modified: head/sbin/mount_udf/mount_udf.c
 ==============================================================================
 --- head/sbin/mount_udf/mount_udf.c	Tue Feb  4 20:52:33 2014	(r261495)
 +++ head/sbin/mount_udf/mount_udf.c	Tue Feb  4 21:15:15 2014	(r261496)
 @@ -77,9 +77,9 @@ main(int argc, char **argv)
  	char fstype[] = "udf";
  	struct iovec *iov;
  	char *cs_disk, *cs_local, *dev, *dir;
 -	int ch, i, iovlen, mntflags, udf_flags, verbose;
 +	int ch, iovlen, mntflags, udf_flags, verbose;
  
 -	i = iovlen = mntflags = udf_flags = verbose = 0;
 +	iovlen = mntflags = udf_flags = verbose = 0;
  	cs_disk = cs_local = NULL;
  	iov = NULL;
  	while ((ch = getopt(argc, argv, "o:vC:")) != -1)
 @@ -129,7 +129,7 @@ main(int argc, char **argv)
  		build_iovec(&iov, &iovlen, "cs_disk", cs_disk, (size_t)-1);
  		build_iovec(&iov, &iovlen, "cs_local", cs_local, (size_t)-1);
  	}
 -	if (nmount(iov, i, mntflags) < 0)
 +	if (nmount(iov, iovlen, mntflags) < 0)
  		err(1, "%s", dev);
  	exit(0);
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/186193: commit references a PR
Date: Tue, 11 Feb 2014 08:20:53 +0000 (UTC)

 Author: brueffer
 Date: Tue Feb 11 08:20:45 2014
 New Revision: 261741
 URL: http://svnweb.freebsd.org/changeset/base/261741
 
 Log:
   MFC: r261496
   
   Unbreak mount_udf by passing the correct iovec length into
   nmount().  This has been broken since r247861.
   
   PR:		bin/186193
   Submitted by:	Arnot Belohlavek
 
 Modified:
   stable/10/sbin/mount_udf/mount_udf.c
 Directory Properties:
   stable/10/   (props changed)
 
 Modified: stable/10/sbin/mount_udf/mount_udf.c
 ==============================================================================
 --- stable/10/sbin/mount_udf/mount_udf.c	Tue Feb 11 08:15:40 2014	(r261740)
 +++ stable/10/sbin/mount_udf/mount_udf.c	Tue Feb 11 08:20:45 2014	(r261741)
 @@ -77,9 +77,9 @@ main(int argc, char **argv)
  	char fstype[] = "udf";
  	struct iovec *iov;
  	char *cs_disk, *cs_local, *dev, *dir;
 -	int ch, i, iovlen, mntflags, udf_flags, verbose;
 +	int ch, iovlen, mntflags, udf_flags, verbose;
  
 -	i = iovlen = mntflags = udf_flags = verbose = 0;
 +	iovlen = mntflags = udf_flags = verbose = 0;
  	cs_disk = cs_local = NULL;
  	iov = NULL;
  	while ((ch = getopt(argc, argv, "o:vC:")) != -1)
 @@ -129,7 +129,7 @@ main(int argc, char **argv)
  		build_iovec(&iov, &iovlen, "cs_disk", cs_disk, (size_t)-1);
  		build_iovec(&iov, &iovlen, "cs_local", cs_local, (size_t)-1);
  	}
 -	if (nmount(iov, i, mntflags) < 0)
 +	if (nmount(iov, iovlen, mntflags) < 0)
  		err(1, "%s", dev);
  	exit(0);
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: brueffer 
State-Changed-When: Mon Mar 3 12:09:23 CET 2014 
State-Changed-Why:  
The fix has been merged to 10-STABLE.  Thanks a lot! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186193 
>Unformatted:
