📄 test9.data
字号:
// test9.data: Will check miscellaneous error conditions -- such as using// an incorrect file descriptor, trying to access a non-existent file,// seeking to a negative position, etc.// 1. Format the disk with 100 blocks total.formatDisk 100 10// 2. Create 3 basic filesfile1 = createinum1 = inumber file1write file1 Names_ 512file2 = createinum2 = inumber file2write file2 Names_ 512file3 = createinum3 = inumber file3write file3 Names_ 512// 3. Delete the second fileclose file2delete inum2// 4. Access the second file with a seek (ERROR)seek file2 1000 0// 5. Write to the second file (ERROR)write file2 Checkers_ 1000// 6. Read from the second file (ERROR)read file2 20// 7. Close the second file and delete it again (ERROR -- though delete // may just return 0)close file2delete inum2// 8. Access a negative file descriptor (ERROR)seek -1 1000 10// 9. Access a free file descriptor (ERROR)write 13 Bonzo_ 50// 10. Access an illegal file descriptor (ERROR)write 30 Socks_ 50// 11. Seek to a negative position (ERROR)seek file1 -1000 0seek file1 -1000 1seek file1 -1000 2// 12. Open non-existent files (ERROR)open 21open 0open -1// 13. Close non-existent files (ERROR)close 21close -1// 14. Do an illegal formatformat 10 100// 14. Shutdown the system and quitshutdownquit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -