Date: Tue, 7 Jun 2016 20:16:02 +0000 (UTC) From: "Conrad E. Meyer" <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301566 - head/sys/fs/nfsclient Message-ID: <201606072016.u57KG2Dj038310@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Tue Jun 7 20:16:01 2016 New Revision: 301566 URL: https://svnweb.freebsd.org/changeset/base/301566 Log: nfs_clvfsops: Fix leading whitespace introduced in r299848 Replace spaces with tabs. No functional change. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Tue Jun 7 20:14:08 2016 (r301565) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Tue Jun 7 20:16:01 2016 (r301566) @@ -763,37 +763,37 @@ nfs_mount_parse_from(struct vfsoptlist * /* * This part comes from sbin/mount_nfs/mount_nfs.c:getnfsargs(). */ - if (*spec == '[' && (delimp = strchr(spec + 1, ']')) != NULL && - *(delimp + 1) == ':') { - hostp = spec + 1; - spec = delimp + 2; - have_bracket = 1; - } else if ((delimp = strrchr(spec, ':')) != NULL) { - hostp = spec; - spec = delimp + 1; - } else if ((delimp = strrchr(spec, '@')) != NULL) { - printf("%s: path@server syntax is deprecated, " + if (*spec == '[' && (delimp = strchr(spec + 1, ']')) != NULL && + *(delimp + 1) == ':') { + hostp = spec + 1; + spec = delimp + 2; + have_bracket = 1; + } else if ((delimp = strrchr(spec, ':')) != NULL) { + hostp = spec; + spec = delimp + 1; + } else if ((delimp = strrchr(spec, '@')) != NULL) { + printf("%s: path@server syntax is deprecated, " "use server:path\n", __func__); - hostp = delimp + 1; - } else { - printf("%s: no <host>:<dirpath> nfs-name\n", __func__); - return (EINVAL); - } - *delimp = '\0'; - - /* - * If there has been a trailing slash at mounttime it seems - * that some mountd implementations fail to remove the mount - * entries from their mountlist while unmounting. - */ - for (speclen = strlen(spec); - speclen > 1 && spec[speclen - 1] == '/'; - speclen--) - spec[speclen - 1] = '\0'; - if (strlen(hostp) + strlen(spec) + 1 > MNAMELEN) { - printf("%s: %s:%s: name too long", __func__, hostp, spec); - return (EINVAL); - } + hostp = delimp + 1; + } else { + printf("%s: no <host>:<dirpath> nfs-name\n", __func__); + return (EINVAL); + } + *delimp = '\0'; + + /* + * If there has been a trailing slash at mounttime it seems + * that some mountd implementations fail to remove the mount + * entries from their mountlist while unmounting. + */ + for (speclen = strlen(spec); + speclen > 1 && spec[speclen - 1] == '/'; + speclen--) + spec[speclen - 1] = '\0'; + if (strlen(hostp) + strlen(spec) + 1 > MNAMELEN) { + printf("%s: %s:%s: name too long", __func__, hostp, spec); + return (EINVAL); + } /* Make both '@' and ':' notations equal */ if (*hostp != '\0') { len = strlen(hostp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606072016.u57KG2Dj038310>