上一页 1 ··· 367 368 369 370 371 372 373 374 375 ··· 619 下一页

2021年1月12日

摘要: #include <linux/string.h> #include <linux/cdev.h> #include <linux/fs.h> #include <mach/gpio.h> //包含管脚操作的相关函数 #include <linux/device.h> //包含创建设备文件的相关函数 阅读全文
posted @ 2021-01-12 02:31 lydstory 阅读(98) 评论(0) 推荐(0)

2021年1月10日

摘要: GPON设备 烽火国际 http://www.fiberhome.com/operator/contact/Default.aspx 阅读全文
posted @ 2021-01-10 05:03 lydstory 阅读(41) 评论(0) 推荐(0)
摘要: kfree_skb()释放一个SKB的步骤: 1)kfree_skb()检测sk_buff结构的引用计数users,如果不为1,则说明此次释放后该SKB还将被用户占用, 因此递减引用计数users后即返回;否则说明不再有其他用户占用该sk_buff结构,调用__kfree_skb()释放之。 2)S 阅读全文
posted @ 2021-01-10 02:06 lydstory 阅读(773) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <syslog.h> #define SYSLOG(arg...) syslog(LOG_ERR,##arg) int main() { SYSLOG(" websafe backup start!"); 阅读全文
posted @ 2021-01-10 01:53 lydstory 阅读(77) 评论(0) 推荐(0)
摘要: tty_struct 头文件 阅读全文
posted @ 2021-01-10 01:26 lydstory 阅读(113) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <linux/kernel.h> #define sec_kmalloc(__size__) kmalloc((__size__), GFP_ATOMIC) int main() { printf("he 阅读全文
posted @ 2021-01-10 01:11 lydstory 阅读(72) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define BUF_SIZE 1024 #define MAX_NAME_SIZE 1024 int running_command(const char *command,char *result) { FILE * 阅读全文
posted @ 2021-01-10 00:53 lydstory 阅读(297) 评论(0) 推荐(0)

2021年1月9日

摘要: https://blog.csdn.net/weixin_39525933/article/details/111907048 阅读全文
posted @ 2021-01-09 23:58 lydstory 阅读(72) 评论(0) 推荐(0)
摘要: 内核层读写应用层文件,使用filp_open函数 在内核中使用有些系统调用(如打开,写文件等操作)需要使用get_fs,set_fs对他们进行保护。如:oldfs=get_fs(); 阅读全文
posted @ 2021-01-09 23:03 lydstory 阅读(1263) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> static void myfopen(void) { FILE *fp = fopen("/tmp/appContext", "w+"); i 阅读全文
posted @ 2021-01-09 07:56 lydstory 阅读(368) 评论(0) 推荐(0)
上一页 1 ··· 367 368 369 370 371 372 373 374 375 ··· 619 下一页

导航