lkml.org 
[lkml]   [2001]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] UFS option parsing

Hi,

Today I accidentally typed "mount -t ufs -o ufstype,ro ..." and the kernel
(2.4.9) oopsed. The following trivial patch fixes it.

Cheers,
Matias.

--- 2.4.9/fs/ufs/super.c.orig Fri Sep 21 20:30:30 2001
+++ 2.4.9/fs/ufs/super.c Fri Sep 21 21:59:34 2001
@@ -264,6 +264,11 @@
if ((value = strchr (this_char, '=')) != NULL)
*value++ = 0;
if (!strcmp (this_char, "ufstype")) {
+ if (!value) {
+ printk ("UFS-fs: The `ufstype' option "
+ "requires an argument\n");
+ return 0;
+ }
ufs_clear_opt (*mount_options, UFSTYPE);
if (!strcmp (value, "old"))
ufs_set_opt (*mount_options, UFSTYPE_OLD);
@@ -287,6 +292,10 @@
}
}
else if (!strcmp (this_char, "onerror")) {
+ if (!value) {
+ printk ("UFS-fs: No `onerror' action specified\n");
+ return 0;
+ }
ufs_clear_opt (*mount_options, ONERROR);
if (!strcmp (value, "panic"))
ufs_set_opt (*mount_options, ONERROR_PANIC);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.070 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site