From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 28 12:20:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.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 9BB4216D for ; Tue, 28 Jan 2014 12:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73AD116D2 for ; Tue, 28 Jan 2014 12:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s0SCK0UA084630 for ; Tue, 28 Jan 2014 12:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s0SCK09o084628; Tue, 28 Jan 2014 12:20:00 GMT (envelope-from gnats) Resent-Date: Tue, 28 Jan 2014 12:20:00 GMT Resent-Message-Id: <201401281220.s0SCK09o084628@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Arnošt Bělohlávek" 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 ; 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 ; 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 ; 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: "Arnošt Bělohlávek" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/186193: mount_udf always return "Invalid argument". X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jan 2014 12:20:00 -0000 >Number: 186193 >Category: misc >Synopsis: mount_udf always return "Invalid argument". >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 28 12:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Arnošt Bělohlávek >Release: Freebsd 10.0-STABLE >Organization: FJFI Č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: >Unformatted: