当前位置:网站首页>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-&
边栏推荐
猜你喜欢
随机推荐
mysql连接报错:Cannot get a connection, pool error Timeout waiting for idle object
作为测试,常用的adb命令
【从零设计 LaTex 模板】1. 一些基础知识
自定义View的流程总结学习
Unity中实现Animation Clip动画片段的倒播(该案例可以防止动画延迟)
酸回收工艺原理
【接口自动化】
序列化、编码、requests库json和data参数
21天学习挑战赛--分班
从交换两数据值看指针的使用(c语言实现)
LruCache与DiskLruCache结合简单实现ImageLoader
废酸回收再利用
剑指 Offer(第 2 版)7/12 18-20
STM32F407ZG TIM通用定时器
剑指 Offer(第 2 版)7/6 9-13
51单片机营养液自动配置搅拌系统TDS浓度采集自动加水加营养液
【fiddler2】使用fiddler mock response 数据
开源游戏服务器框架NoahGameFrame(NF)简介(一)
酸阻滞树脂
在Unity中利用代码动态更改场景中的天空盒