debug
Iphone4
linux & web & filesystem & python
展开
-
memcpy惹的祸
struct osd_node{ int osd_no; char osd_address[20]; }; struct osd_table{ int osd_count; struct osd_node *osd; }; 如上结构体,在程序里先执行了这一句, memcpy(related_osd_table, osdtable.osd原创 2013-03-06 23:07:39 · 656 阅读 · 0 评论 -
udp发送完消息后要关闭端口描述符
int get_osd_oob_list(struct osd_node onode, struct list_head *head) { printf("\nEntering %s ", __func__); char message[4096]; char oob_receive_buf[8192]; int ret, m_type, valid_len; int failure_t原创 2013-03-08 12:01:45 · 1469 阅读 · 0 评论 -
linux下链表要初始化
linux下使用链表很频繁,但是不要忘记初始化,否则会有segment fault,如下:struct list_head osd_oobinfo_list[OOBINO_LIST_LEN]; 因为忘记了这个初始化过程: for(i=0; i < OOBINO_LIST_LEN; i++) INIT_LIST_HEAD(&osd_oobinfo_list[i]); 偶纠结了好久~~原创 2013-03-03 21:16:09 · 522 阅读 · 0 评论