patch-1.3.48 linux/fs/hpfs/hpfs_fs.c

Next file: linux/fs/inode.c
Previous file: linux/fs/buffer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.47/linux/fs/hpfs/hpfs_fs.c linux/fs/hpfs/hpfs_fs.c
@@ -232,7 +232,7 @@
 /* forwards */
 
 static int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
-		      int *lowercase, int *conv);
+		      int *lowercase, int *conv, int *nocheck);
 static int check_warn(int not_ok,
 		      const char *p1, const char *p2, const char *p3);
 static int zerop(void *addr, unsigned len);
@@ -344,6 +344,7 @@
 	int lowercase;
 	int conv;
 	int dubious;
+	int nocheck;
 
 	MOD_INC_USE_COUNT;
 
@@ -351,7 +352,8 @@
 	 * Get the mount options
 	 */
 
-	if (!parse_opts(options, &uid, &gid, &umask, &lowercase, &conv)) {
+	if (!parse_opts(options, &uid, &gid, &umask, &lowercase, &conv,
+				 &nocheck)) {
 		printk("HPFS: syntax error in mount options.  Not mounted.\n");
 		s->s_dev = 0;
 		MOD_DEC_USE_COUNT;
@@ -414,7 +416,7 @@
 	 * so don't
 	 */
 
-	if (dubious)
+	if (dubious && !nocheck)
 		goto bail2;
 
 	dubious |= check_warn((spareblock->n_dnode_spares !=
@@ -544,7 +546,7 @@
  */
 
 static int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
-		      int *lowercase, int *conv)
+		      int *lowercase, int *conv, int *nocheck)
 {
 	char *p, *rhs;
 
@@ -553,6 +555,7 @@
 	*umask = current->fs->umask;
 	*lowercase = 1;
 	*conv = CONV_BINARY;
+        *nocheck = 0;
 
 	if (!opts)
 		return 1;
@@ -599,6 +602,8 @@
 			else
 				return 0;
 		}
+		else if (!strcmp(p,"nocheck")) 
+			*nocheck=1;
 		else
 			return 1;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this