📄 halt.c
字号:
#include <stdio.h>
#include "filesys.h"
halt()
{
struct inode *inode;
int i,j;
chdir("..");
iput(cur_path_inode);
for(i=0;i<USERNUM;i++)
{
if(user[i].u_uid!=0)
{
for(j=0;j<NOFILE;i++)
{
if(user[i].u_ofile[j]!=SYSOPENFILE+1)
{
close(user[i].u_ofile[j]);
user[i].u_ofile[j]=SYSOPENFILE+1;
}
}
}
}
fseek(fd,BLOCKSIZ,SEEK_SET);
fwrite(&filsys,1,sizeof(struct filsys),fd);
fclose(fd);
printf("\nGood Bye\n\n");
printf("\npress any key to continue...\n\n");
getchar();
exit(0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -