Date: Tue, 28 Jan 2014 12:10:19 GMT From: "Arnošt Bělohlávek" <belzebubc@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/186193: mount_udf always return "Invalid argument". Message-ID: <201401281210.s0SCAJe8001165@oldred.freebsd.org> Resent-Message-ID: <201401281220.s0SCK09o084628@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401281210.s0SCAJe8001165>