freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[互聯(lián)網(wǎng)]linux程序設(shè)計(jì)——技術(shù)技巧與項(xiàng)目實(shí)踐---linux文件系統(tǒng)與編程--第6章-資料下載頁

2024-10-16 17:17本頁面
  

【正文】 extern int iHave_formated。 ? extern int iCur_free_block_index。 ? /*proptype of the sub roution used in the file system*/ ? extern struct inode *iget( )。 ? extern int iput( )。 ? extern unsigned int balloc( )。 ? extern bfree( )。 ? extern struct inode *ialloc( )。 ? extern ifree( )。 ? extern unsigned int namei( )。 ? extern unsigned short iname( )。 ? extern unsigned int access( )。 ? extern _dir( )。 ? extern mkdir( )。 ? extern chdir( )。 ? extern unsigned short open( )。 ? extern creat( )。 ? extern unsigned int read( )。 ? extern unsigned int write( )。 ? extern int login( )。 ? extern logout( )。 ? extern install( )。 ? extern format( )。 ? extern close( )。 ? extern halt( )。 ? include ? include ? struct hinode hinode[NHINO]。 ? struct dir dir。 ? struct file sys_ofile[SYSOPENFILE]。 ? struct filsys filsys。 ? struct pwd pwd[PWDNUM]。 ? struct user user[USERNUM]。 ? FILE *fd。 ? struct inode *cur_path_inode。 ? int user_id。 ? int iHave_formated。 ? int iCur_free_block_index。 ? main( ) ? { unsigned short ab_fd1,ab_fd2,ab_fd3,ab_fd4,ab_fd5。 ? char *buf。 ? char file_content_buf[BLOCKSIZ]。 ? char c。 ? printf(begin:\n)。 ? printf(\nDo you want to format the disk?\n)。 ? if(getchar( )==39。y39。) ? printf(\nFormat will erase context on the disk \nAre you sure?\n)。 ? getchar()。 (2) 主程序 main( )文件 ? if((c=getchar( ))==39。y39。) ? { ? printf(format starts\n)。 ? format( )。 ? iHave_formated = 1。 ? printf(format ended\n)。 ? } ? else ? printf(received char :%c from stdin\n,c)。 ? printf(step 1 ended\n)。 ? install( )。 ? printf(step 2 ended\n)。 ? _dir( )。 ? printf(step 3 ended\n)。 ? login(2118,abcd)。 ? user_id=0。 ? printf(step 4 ended\n)。 2021/11/10 56 ? mkdir(a2118)。 ? _dir()。 ? printf(step 51 ended\n)。 ? chdir(a2118)。 ? _dir()。 ? printf(step 52 ended\n)。 ? ab_fd1=creat(2118,01777)。 ? _dir()。 ? printf(step 6 ended\n)。 ? buf=(char *)malloc(BLOCKSIZ*6+5)。 ? printf(step 7 ended\n)。 ? write(2118,ab_fd1,buf,BLOCKSIZ*6+5)。 ? printf(step 8 ended\n)。 ? close(2118,ab_fd1)。 ? printf(step 9 ended\n)。 ? free(buf)。 2021/11/10 57 ? mkdir(subdir)。 ? printf(step 101 ended\n)。 ? chdir(subdir)。 ? printf(step 102 ended\n)。 ? ab_fd2=creat(2118,01777)。 ? printf(step 11 ended\n)。 ? buf=(char *)malloc(BLOCKSIZ*4+20)。 ? printf(step 12 ended\n)。 ? write(2118,ab_fd2,buf,BLOCKSIZ*4+20)。 ? printf(step 13 ended\n)。 ? close(2118,ab_fd2)。 ? free(buf)。 ? printf(step 14 ended\n)。 ? chdir(..)。 ? printf(step 15 ended\n)。 2021/11/10 58 ? ab_fd3=creat(2118,01777)。 ? buf=(char *)malloc(BLOCKSIZ*10+255)。 ? write(2118,ab_fd3,buf,BLOCKSIZ*3+255)。 ? close(2118,ab_fd3)。 ? free(buf)。 ? delete()。 ? printf(step 16 ended\n)。 ? ab_fd4=creat(2118,01777)。 ? buf=(char *)malloc(BLOCKSIZ*8+300)。 ? printf(step 17 ended\n)。 ? write(2118,ab_fd4,buf,BLOCKSIZ*8+300)。 ? printf(step 18 ended\n)。 ? close(2118,ab_fd4)。 ? free(buf)。 ? printf(step 19 ended\n)。 2021/11/10 59 ? ab_fd3=open(2118,FAPPEND)。 ? printf(step 20 ended\n)。 ? buf=(char *)malloc(BLOCKSIZ*3+100)。 ? write(2118,ab_fd3,buf,BLOCKSIZ*3+100)。 ? printf(step 21 ended,ab_fd3 = %d\n,ab_fd3)。 ? close(2118,ab_fd3)。 ? ab_fd5=creat(2118,文件 5,01777)。 ? write(2118,ab_fd5,\nFly me to the moon\nAnd let me play among the stars\nLet me see what Spring is like\nOn Jupiter and Mars\n hello world one dream.\n同一個(gè)世界同一個(gè)夢(mèng)想 ,BLOCKSIZ)。 ? close(2118,ab_fd5)。 ? ab_fd5=open(2118,文件 5,FREAD)。 ? read(2118,ab_fd5,file_content_buf,BLOCKSIZ)。 ? printf(讀出文件 5的內(nèi)容 : %s\n,file_content_buf)。 ? close(2118,ab_fd5)。 2021/11/10 60 ? printf(step 22 ended\n)。 ? free(buf)。 ? _dir( )。 ? chdir(..)。 ? printf(\nstep 23 ended\n)。 ? logout(2118)。 ? printf(step 24 ended\n)。 ? halt( )。 ? } 2021/11/10 61 ? (3) i節(jié)點(diǎn)內(nèi)容獲取 iget()與釋放 iput()函數(shù)所在的文件 ? (4) 磁盤塊分配函數(shù) balloc()與釋放函數(shù) bfree()所在文件 ? (5)目錄顯示 _dir( )和創(chuàng)建 mkdir()與改變 chdir()函數(shù)所在文件 ? (6) 分配與釋放 i節(jié)點(diǎn)函數(shù) ialloc()與 ifree()文件 ? (7) 搜索函數(shù) iname()與 namei()文件 ? (8) 訪問控制函數(shù) access()文件 ? (9) 打開文件函數(shù) open()文件 ? (10) 創(chuàng)建文件函數(shù) create()文件 ? (11) 讀寫文件用函數(shù) read()與 write()文件 ? (12) 用戶登錄與退出函數(shù) login()與 logout()文件 ? (13) 文件系統(tǒng)格式化函數(shù) format()文件 ? (14) 進(jìn)入文件系統(tǒng)函數(shù) install()的文件 ? (15) 關(guān)閉文件系統(tǒng)函數(shù) close()的文件 ? (16) 退出文件系統(tǒng)函數(shù) halt()的文件 ? (17) 文件刪除函數(shù) delete()的文件 ? (18)目錄信息顯示輸出函數(shù) dirlt()文件 2021/11/10 62 ? (19) Makefile文件 (如果編譯出現(xiàn)段錯(cuò)誤,則需要下面的 mcpu=i686,否則省略 ) ? filsys: ? cc mcpu=i686 o filsys ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : 2021/11/10 63 ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? : ? cc mcpu=i686 c ? clean: ? rm filsys filesystem *.o 2021/11/10 64 ? Linux文件系統(tǒng)設(shè)計(jì)與編程實(shí)現(xiàn)的理解和實(shí)踐非常重要,掌握了這些基礎(chǔ)技術(shù),就可以在嵌入式應(yīng)用中根據(jù)需要定制其文件系統(tǒng)了。即使不能完全理解這些內(nèi)容,在嵌入式文件系統(tǒng)編制中也會(huì)有助于理解目標(biāo)機(jī)文件系統(tǒng)的編制過程。 ? 建議讀者先運(yùn)行本教材附帶光盤中的程序,當(dāng)能夠成功運(yùn)行后再自行錄入、編輯、調(diào)試、修改和完善該文件系統(tǒng)的設(shè)計(jì)。 2021/11/10 65 實(shí)戰(zhàn)技巧 消除 Xwindows下的死機(jī)現(xiàn)象 ? 如果 Xwindows突然失去響應(yīng),其實(shí)系統(tǒng)并沒有死機(jī)??梢杂脙蓚€(gè)方法消除這種現(xiàn)象: ? 一是用鍵盤上的復(fù)合鍵 Ctrl+Alt+Backspace關(guān)閉當(dāng)前運(yùn)行的任務(wù),強(qiáng)行退出 X平臺(tái);二是使用虛擬控制臺(tái),即按住 Ctrl+Alt+F2復(fù)合鍵,把系統(tǒng)切換到另一個(gè)操作臺(tái),然后登錄系統(tǒng),再執(zhí)行 ps ax|grep startx命令,列出 Xserver的進(jìn)程標(biāo)識(shí)( PID),接著在命令行中輸入命令消除 Xwindows下的死機(jī)現(xiàn)象: ? kill 9 PID_Number,最后通過 Alt+F1復(fù)合鍵返回原來的平臺(tái)。 2021/11/10 66 66 Thank you. See you next lesson
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1