※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.136.158.126
※ 編輯: gn00618777 來自: 220.136.158.126 (02/04 16:15)
他說大部分的驅動程式都會用到三個重要資料結構
struct file_operations
struct file
struct inode
然後,在稍後的章節3.4 "註冊字元裝置"
介紹 struct cdev,代表字元裝置,這我就跟 struct file 搞混了,因為 struct cdev
裡面的欄位好像跟 sstruct file 一樣有 ops 指標指向 struct file_operations
請問這裡介紹的 struct cdev 就是 struct file 的形式嗎?
--