BSD 4_3_Reno release
[unix-history] / usr / src / sbin / mount / mount.c
index f854908..f3456c7 100644 (file)
@@ -2,7 +2,19 @@
  * Copyright (c) 1980, 1989 The Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1980, 1989 The Regents of the University of California.
  * All rights reserved.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
@@ -12,7 +24,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)mount.c    5.38 (Berkeley) %G%";
+static char sccsid[] = "@(#)mount.c    5.39 (Berkeley) 6/22/90";
 #endif /* not lint */
 
 #include "pathnames.h"
 #endif /* not lint */
 
 #include "pathnames.h"
@@ -603,7 +615,19 @@ getnfsopts(optarg, nfsargsp, opflagsp, retrycntp)
                if (!strcmp(cp, "bg")) {
                        *opflagsp |= BGRND;
                } else if (!strcmp(cp, "soft")) {
                if (!strcmp(cp, "bg")) {
                        *opflagsp |= BGRND;
                } else if (!strcmp(cp, "soft")) {
+                       if (nfsargsp->flags & NFSMNT_SPONGY) {
+                               fprintf(stderr,
+                                       "Options soft, spongy mutually exclusive\n");
+                               exit(1);
+                       }
                        nfsargsp->flags |= NFSMNT_SOFT;
                        nfsargsp->flags |= NFSMNT_SOFT;
+               } else if (!strcmp(cp, "spongy")) {
+                       if (nfsargsp->flags & NFSMNT_SOFT) {
+                               fprintf(stderr,
+                                       "Options soft, spongy mutually exclusive\n");
+                               exit(1);
+                       }
+                       nfsargsp->flags |= NFSMNT_SPONGY;
                } else if (!strcmp(cp, "intr")) {
                        nfsargsp->flags |= NFSMNT_INT;
                } else if (!strcmp(cp, "tcp")) {
                } else if (!strcmp(cp, "intr")) {
                        nfsargsp->flags |= NFSMNT_INT;
                } else if (!strcmp(cp, "tcp")) {
@@ -627,6 +651,12 @@ getnfsopts(optarg, nfsargsp, opflagsp, retrycntp)
                }
                cp = nextcp;
        }
                }
                cp = nextcp;
        }
+       if (nfsargsp->sotype == SOCK_DGRAM) {
+               if (nfsargsp->rsize > NFS_MAXDGRAMDATA)
+                       nfsargsp->rsize = NFS_MAXDGRAMDATA;
+               if (nfsargsp->wsize > NFS_MAXDGRAMDATA)
+                       nfsargsp->wsize = NFS_MAXDGRAMDATA;
+       }
 }
 
 char *
 }
 
 char *