From owner-freebsd-bugs@FreeBSD.ORG Mon Feb 18 21:13:55 2008 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A75016A475 for ; Mon, 18 Feb 2008 21:13:55 +0000 (UTC) (envelope-from LoN_Kamikaze@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id C41CB13C4EE for ; Mon, 18 Feb 2008 21:13:54 +0000 (UTC) (envelope-from LoN_Kamikaze@gmx.de) Received: (qmail invoked by alias); 18 Feb 2008 20:47:12 -0000 Received: from nat-wh-1.rz.uni-karlsruhe.de (EHLO mobileKamikaze.norad) [129.13.72.169] by mail.gmx.net (mp025) with SMTP; 18 Feb 2008 21:47:12 +0100 X-Authenticated: #5465401 X-Provags-ID: V01U2FsdGVkX19qoOFc78BqhO3Gz3orxzyf88emshWxqm+QM7CotU Q1zINWlTzTwjDo Message-ID: <47B9EEA3.7020408@gmx.de> Date: Mon, 18 Feb 2008 21:46:27 +0100 From: Dominic Fandrey User-Agent: Thunderbird 2.0.0.9 (X11/20080205) MIME-Version: 1.0 To: remko@elvandar.org References: <200802181900.m1IJ06kn090690@freefall.freebsd.org> <58820.195.64.94.120.1203367310.squirrel@galain.elvandar.org> In-Reply-To: <58820.195.64.94.120.1203367310.squirrel@galain.elvandar.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-bugs@freebsd.org Subject: Re: bin/120784: [patch] mount(8): 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 21:13:55 -0000 Remko Lodder wrote: > I couldn't read the .diff file, it was encoded. > > Can you submit it as plain text? possibly send it inline instead of > attaching it? > > Thanks, > remko > Sorry about that. The file appears to have arrived corrupted. diff -Pur sbin/mount.orig/mount.c sbin/mount/mount.c --- sbin/mount.orig/mount.c 2008-02-18 19:44:05.000000000 +0100 +++ sbin/mount/mount.c 2008-02-18 19:44:37.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 19:44:05.000000000 +0100 +++ sbin/mount/mount_fs.c 2008-02-18 19:44:37.000000000 +0100 @@ -107,6 +107,11 @@ val = p + 1; } build_iovec(&iov, &iovlen, optarg, val, (size_t)-1); + // Repair arguments, in case they are required when + // falling back to the old style exec_mountprog. + if (p != NULL) { + *p = '='; + } break; case '?': default: @@ -131,8 +136,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); }