导航

2011年2月28日

摘要: 以write为例子.in Userspace:int ret;ret=write(serial_fd,(char *)write_buf,sizeof(write_buf));if(ret<0){ printf("strerror: %s\n", strerror(errno));}in Driverxxx_write(){ return -EAGAIN;//Try_again}A common mistake is to doif (somecall() == -1) { printf("somecall() failed\n"); if (er 阅读全文

posted @ 2011-02-28 09:47 cornflower 阅读(280) 评论(0) 推荐(0) 编辑