Date: Mon, 18 Feb 2008 21:46:27 +0100 From: Dominic Fandrey <LoN_Kamikaze@gmx.de> To: remko@elvandar.org Cc: freebsd-bugs@freebsd.org Subject: Re: bin/120784: [patch] mount(8): allow mount from fstab with 3rd party tools like ntfs-3g Message-ID: <47B9EEA3.7020408@gmx.de> In-Reply-To: <58820.195.64.94.120.1203367310.squirrel@galain.elvandar.org> References: <200802181900.m1IJ06kn090690@freefall.freebsd.org> <58820.195.64.94.120.1203367310.squirrel@galain.elvandar.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47B9EEA3.7020408>