From owner-freebsd-bugs@FreeBSD.ORG Mon Feb 18 08:30:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7165A16A41B for ; Mon, 18 Feb 2008 08:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4EB3E13C4E5 for ; Mon, 18 Feb 2008 08:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1I8U21p016138 for ; Mon, 18 Feb 2008 08:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1I8U2rS016137; Mon, 18 Feb 2008 08:30:02 GMT (envelope-from gnats) Resent-Date: Mon, 18 Feb 2008 08:30:02 GMT Resent-Message-Id: <200802180830.m1I8U2rS016137@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, Dominic Fandrey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 484DF16A420 for ; Mon, 18 Feb 2008 08:22:40 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9B613C46A for ; Mon, 18 Feb 2008 08:22:40 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m1I8KCgj021662 for ; Mon, 18 Feb 2008 08:20:12 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m1I8KCpB021661; Mon, 18 Feb 2008 08:20:12 GMT (envelope-from nobody) Message-Id: <200802180820.m1I8KCpB021661@www.freebsd.org> Date: Mon, 18 Feb 2008 08:20:12 GMT From: Dominic Fandrey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/120784: [patch] allow mount from fstab with 3rd party tools like ntfs-3g X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 08:30:02 -0000 >Number: 120784 >Category: bin >Synopsis: [patch] allow mount from fstab with 3rd party tools like ntfs-3g >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Feb 18 08:30:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_7 >Organization: private >Environment: # uname -a 0 /usr/src FreeBSD mobileKamikaze.norad 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #3: Wed Feb 13 17:52:28 CET 2008 root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b amd64 >Description: With the new mount system 3rd party mounts like the following do not work any more (this is from my fstab): /dev/ntfs/2vault /mnt/vault ntfs-3g rw,late,gid=5,umask=113,dmask=002 0 0 Because the old style mount is only used for known types like ntfs. My workaround was so far to do the following: # mv /sbin/mount_ntfs /sbin/mount_ntfs.orig # ln -s /usr/sbin/mount_ntfs-3g /sbin/mount_ntfs I don't like this method and it has to be applied after every installworld. So instead I hacked the mount source to fall back to the old style, when mounting failed. >How-To-Repeat: Try using any 3rd party mount tool like mount_ntfs-3g or mount_sshfs (fuse ports) in "mount -t ntfs-3g" style. They will not work. Instead you'll have to directly use "mount_ntfs-3g". >Fix: Files sbin/mount.orig/.mount.c.swp and sbin/mount/.mount.c.swp differ diff -Pur sbin/mount.orig/mount.c sbin/mount/mount.c --- sbin/mount.orig/mount.c 2008-02-18 09:07:45.000000000 +0100 +++ sbin/mount/mount.c 2008-02-18 09:11:16.000000000 +0100 @@ -560,7 +560,12 @@ if (use_mountprog(vfstype)) { ret = exec_mountprog(name, execname, argv); } else { - ret = mount_fs(vfstype, argc, argv); + ret = mount_fs(vfstype, argc, argv); + if (ret < 0) { + if (verbose) + warn("falling back to old style mount"); + ret = exec_mountprog(name, execname, argv); + } } free(optbuf); diff -Pur sbin/mount.orig/mount_fs.c sbin/mount/mount_fs.c --- sbin/mount.orig/mount_fs.c 2008-02-18 09:07:45.000000000 +0100 +++ sbin/mount/mount_fs.c 2008-02-18 08:58:31.000000000 +0100 @@ -131,8 +131,6 @@ build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); ret = nmount(iov, iovlen, mntflags); - if (ret < 0) - err(1, "%s %s", dev, errmsg); return (ret); } >Release-Note: >Audit-Trail: >Unformatted: