简单文件系统的实现的实验报告(8)

2025-11-19

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;

六, 程序编写和调试中遇到的一些问题

一, 问题:删除文件目录时,忘记检测该目录是否未空,导致删除时,虽然删除了该目录,但该目录下的文件没有被删除,以至于,文件系统资源没有释放。

原因:没有判断该目录是否为空,没有清空该目录文件的目录项。 二, 程序的不足之处

该文件系统的基本功能都已实现,但大部分功能还是受限制的,如根目录区的大小是固定的。对文件的打开的读写,可以更加灵活点。在寻找空闲盘块的时候,只是简单的使用线性查找,如果文件系统交大,效率将会很低。还只是实现了单用户单任务的文件系统,如果有可能,可以实现多用户多任务的文件系统。


简单文件系统的实现的实验报告(8).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:丘区小二型水库除险加固工程施工组织设计 - 图文

相关阅读
本类排行
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 7

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219