相关文章  
  • linux入门教程第1章系统简介
  • 教程/操作系统手把手教你装Linux系统
  • Linux办公一条龙之初识OpenOffice(无图)
  • 基于Linux操作系统--构建路由器的方法
  • Linux服务器上的备份和恢复(上)
  • 建立针对arm-linux的交叉编译环境
  • Linux服务器上的备份和恢复(下)
  • 入门文章:教你学会编写Linux设备驱动之三
  • 解读linux内核源码的入门方法(上)
  • 大学考试的LINUX试题参考答案(3)
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    入门文章:教你学会编写Linux设备驱动之结束篇3

    _t *f_pos

    ){

    loff_t pos;

    pos = *f_pos;

    if ((pos==4096) || (count>4096)) return 0;

    pos += count;

    if (pos > 4096) {

    count -= (pos - 4096);

    pos = 4096;

    }

    if (copy_from_user(asdf_body+*f_pos, buf, count)) return -EFAULT;

    *f_pos = pos;

    return count;

    }


    static loff_t

    asdf_lseek /* lseek回调 */

    (

    struct file * file,

    loff_t offset,

    int orig

    ){

    loff_t p

    页码:[1] [2] [3] [4] [5]3页、共5页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved