当前位置:网站首页>Teach you to change the kernel source code--sysfs virtual file system 2
Teach you to change the kernel source code--sysfs virtual file system 2
2022-08-10 06:14:00 【Liu Shigang】
Environment:uos
Kernel code version:4.19.90
First, in the previous article, custom folders and files were created in /sys/.
So, ask a question:
Why is it under the /sys/ folder by default when using the kobject_create_and_add() kernel interface to create a node?
Go to start_kernel with questions to find answers.
This is the calling process I found myself.
The last function sysfs_create_dir_ns() creates a folder, which has been changed by me.
That part of the change is the answer.
Look at the code first:
/** * When the interface is found to be NULL, why is it in the /sys directory by default */if (kobj->parent){parent = kobj-&
边栏推荐
猜你喜欢
开源游戏服务器框架NoahGameFrame(NF)客户端环境搭建(三)
从零开始构建Google Protocol Buffer / protobuf 的helloworld工程(超级详细)
8个问题轻松掌握Unity前向渲染
STM32F407ZG GPIO输出相关实验
AR Foundation Editor Remote插件使用方法
51单片机AD590温度测量ADC0832运放2.73V减法电压变换
GC0053-STM32单片机NTC热敏电阻温度采集及控制LCD1602
STM32单片机手机APP蓝牙高亮RGB彩灯控制板任意颜色亮度调光
自定义View的流程总结学习
Unity中实现Animation Clip动画片段的倒播(该案例可以防止动画延迟)
随机推荐
AR Foundation Editor Remote插件使用方法
优先级队列,大小顶堆PriorityQueue
序列化、编码、requests库json和data参数
unity守则(随时持续更新\自我总结)
在Unity中利用代码动态更改场景中的天空盒
C#热更新比Lua好在哪里?
电路分析中的电容器的基本知识
所有文章汇总目录
markdown使用技巧
Linux的文件IO与标准IO,以及IO缓存
详解 Hough 变换(上)基本原理与直线检测
ASP.Net利用代码点击相应按钮来关闭当前的页面(亲测有效)
二叉树 6/21 91-95
中间件-Rocktmq
STM32单片机OLED俄罗斯方块单片机小游戏
溶液中重金属去除
通过配置CubeMX的TIMER的PWM初始化实现硬件PWM呼吸灯闪烁
自定义View的流程总结学习
废酸回收再利用
每日刷题(day02)——leetcode 622. 设计循环队列