else
printf(\ight command.\\n\
break;
case 2:
if(openfilelist[curfd].attribute&0x20) { } else
printf(\ight command.\\n\my_ls(); putchar('\\n');
break;
case 3:
sp=strtok(NULL,\
if(sp && openfilelist[curfd].attribute&0x20) else
printf(\ight command.\\n\my_cd(sp);
break;
case 4:
sp=strtok(NULL,\
if(sp && openfilelist[curfd].attribute&0x20) else
printf(\ight command.\\n\my_create(sp);
break;
case 5:
sp=strtok(NULL,\
if(sp && openfilelist[curfd].attribute&0x20) else
printf(\ight command.\\n\my_rm(sp);
break;
case 6:
sp=strtok(NULL,\
if(sp && openfilelist[curfd].attribute&0x20) { } Else
if(strchr(sp,'.')) else
printf(\curfd=my_open(sp);
printf(\ight command.\\n\
} }
}
break;
case 7:
if(!(openfilelist[curfd].attribute&0x20)) else
printf(\curfd=my_close(curfd);
break;
case 8:
if(!(openfilelist[curfd].attribute&0x20)) else
printf(\my_write(curfd);
break;
case 9:
if(!(openfilelist[curfd].attribute&0x20)) else
printf(\
my_read(curfd,openfilelist[curfd].length);
break;
case 10:
if(openfilelist[curfd].attribute&0x20) { } else
printf(\ight command.\\n\my_exitsys(); return ;
break;
default: }
printf(\ight command.\\n\break;
六, 程序编写和调试中遇到的一些问题
一, 问题:删除文件目录时,忘记检测该目录是否未空,导致删除时,虽然删除了该目录,但该目录下的文件没有被删除,以至于,文件系统资源没有释放。
原因:没有判断该目录是否为空,没有清空该目录文件的目录项。 二, 程序的不足之处
该文件系统的基本功能都已实现,但大部分功能还是受限制的,如根目录区的大小是固定的。对文件的打开的读写,可以更加灵活点。在寻找空闲盘块的时候,只是简单的使用线性查找,如果文件系统交大,效率将会很低。还只是实现了单用户单任务的文件系统,如果有可能,可以实现多用户多任务的文件系统。

