Date: Mon, 8 Sep 2014 10:57:43 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271258 - head/contrib/smbfs/mount_smbfs Message-ID: <201409081057.s88Avhm3096855@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Mon Sep 8 10:57:43 2014 New Revision: 271258 URL: http://svnweb.freebsd.org/changeset/base/271258 Log: Make mount_smbfs(8) preserve the "automounted" mount flag. The issue here is that we have to pass this flag as a string, in iov, because it doesn't fit in mntflags, which is an int. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/contrib/smbfs/mount_smbfs/mount_smbfs.c Modified: head/contrib/smbfs/mount_smbfs/mount_smbfs.c ============================================================================== --- head/contrib/smbfs/mount_smbfs/mount_smbfs.c Mon Sep 8 09:33:43 2014 (r271257) +++ head/contrib/smbfs/mount_smbfs/mount_smbfs.c Mon Sep 8 10:57:43 2014 (r271258) @@ -81,7 +81,7 @@ main(int argc, char *argv[]) #else struct xvfsconf vfc; #endif - char *next; + char *next, *p, *val; int opt, error, mntflags, caseopt, fd; uid_t uid; gid_t gid; @@ -194,6 +194,13 @@ main(int argc, char *argv[]) }; case 'o': getmntopts(optarg, mopts, &mntflags, 0); + p = strchr(optarg, '='); + val = NULL; + if (p != NULL) { + *p = '\0'; + val = p + 1; + } + build_iovec(&iov, &iovlen, optarg, val, (size_t)-1); break; case 'c': switch (optarg[0]) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409081057.s88Avhm3096855>