Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147389374
D10301.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D10301.id.diff
View Options
Index: head/sbin/mount_nfs/mount_nfs.c
===================================================================
--- head/sbin/mount_nfs/mount_nfs.c
+++ head/sbin/mount_nfs/mount_nfs.c
@@ -153,19 +153,13 @@
char *mntname, *p, *spec, *tmp;
char mntpath[MAXPATHLEN], errmsg[255];
char hostname[MAXHOSTNAMELEN + 1], gssn[MAXHOSTNAMELEN + 50];
- const char *fstype, *gssname;
+ const char *gssname;
iov = NULL;
iovlen = 0;
memset(errmsg, 0, sizeof(errmsg));
gssname = NULL;
- fstype = strrchr(argv[0], '_');
- if (fstype == NULL)
- errx(EX_USAGE, "argv[0] must end in _fstype");
-
- ++fstype;
-
while ((c = getopt(argc, argv,
"23a:bcdD:g:I:iLlNo:PR:r:sTt:w:x:U")) != -1)
switch (c) {
@@ -272,7 +266,6 @@
} else if (strcmp(opt, "nfsv4") == 0) {
pass_flag_to_nmount=0;
mountmode = V4;
- fstype = "nfs";
nfsproto = IPPROTO_TCP;
if (portspec == NULL)
portspec = "2049";
@@ -355,7 +348,6 @@
break;
case 4:
mountmode = V4;
- fstype = "nfs";
nfsproto = IPPROTO_TCP;
if (portspec == NULL)
portspec = "2049";
@@ -436,17 +428,11 @@
/* The default is to keep retrying forever. */
retrycnt = 0;
- /*
- * If the fstye is "oldnfs", run the old NFS client unless the
- * "nfsv4" option was specified.
- */
- if (strcmp(fstype, "nfs") == 0) {
- if (modfind("nfscl") < 0) {
- /* Not present in kernel, try loading it */
- if (kldload("nfscl") < 0 ||
- modfind("nfscl") < 0)
- errx(1, "nfscl is not available");
- }
+ if (modfind("nfscl") < 0) {
+ /* Not present in kernel, try loading it */
+ if (kldload("nfscl") < 0 ||
+ modfind("nfscl") < 0)
+ errx(1, "nfscl is not available");
}
/*
@@ -470,8 +456,7 @@
if (checkpath(mntname, mntpath) != 0)
err(1, "%s", mntpath);
- build_iovec(&iov, &iovlen, "fstype",
- __DECONST(void *, fstype), (size_t)-1);
+ build_iovec_argf(&iov, &iovlen, "fstype", "nfs");
build_iovec(&iov, &iovlen, "fspath", mntpath, (size_t)-1);
build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 11, 2:04 PM (10 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29541022
Default Alt Text
D10301.id.diff (2 KB)
Attached To
Mode
D10301: Remove support for long gone oldnfs.
Attached
Detach File
Event Timeline
Log In to Comment