Hi all,
When I tried to mount yaffs2 with two options "no-checkpoint-read" "no-checkpoint-write" together on linux-2.6.22, I got failed:
" # mount -t yaffs2 -o no-checkpoint-read,no-checkpoint-write /dev/mtdblock9 /mnt/yaffs/</DIV>
<DIV> yaffs: Bad mount option " "<BR> mount: Mounting /dev/mtdblock9 on /mnt/yaffs/ failed: Invalid argument "
Both "no-checkpoint-read" and "no-checkpoint-write" are supported by yaffs2, but yaffs_parse_options failed to parse them. Seems yaffs_parse_options cann't skip the comma. I attached a patch to fix this bug.
----------
Jiangli
你 玩 过 大 富 翁 吗 ?使 用 邮 箱 积 分 兑 换 道 具 ,点 击 这 里 >> --- yaffs2/yaffs_fs.c 2007-10-19 19:55:42.000000000 +0800
+++ yaffs_fs.c 2007-10-19 20:45:56.254642424 +0800
@@ -1556,12 +1556,14 @@
memset(cur_opt,0,MAX_OPT_LEN+1);
p = 0;
- while(*options_str && *options_str != ','){
- if(p < MAX_OPT_LEN){
+ while(*options_str){
+ if(p < MAX_OPT_LEN && *options_str != ','){
cur_opt[p] = *options_str;
p++;
}
options_str++;
+ if( *options_str == ',')
+ break;
}
if(!strcmp(cur_opt,"inband-tags"))