152 PRINT_ERR(
"create /proc/power error!\n");
155 power->
uid = OS_POWER_PRIVILEGE;
156 power->
gid = OS_POWER_PRIVILEGE;
160 PRINT_ERR(
"create /proc/power/power_mode error!\n");
164 mode->uid = OS_POWER_PRIVILEGE;
165 mode->gid = OS_POWER_PRIVILEGE;
169 PRINT_ERR(
"create /proc/power/power_lock error!\n");
173 lock->
uid = OS_POWER_PRIVILEGE;
174 lock->
gid = OS_POWER_PRIVILEGE;
177 if (unlock == NULL) {
178 PRINT_ERR(
"create /proc/power/power_unlock error!\n");
182 unlock->
uid = OS_POWER_PRIVILEGE;
183 unlock->
gid = OS_POWER_PRIVILEGE;
187 PRINT_ERR(
"create /proc/power/power_count error!\n");
191 count->uid = OS_POWER_PRIVILEGE;
192 count->gid = OS_POWER_PRIVILEGE;
void ProcFreeEntry(struct ProcDirEntry *pde)
释放
static const struct ProcFileOperations PowerLock
proc 拿电源锁操作
static const struct ProcFileOperations PowerUnlock
static const struct ProcFileOperations PowerMode
static const struct ProcFileOperations PowerCount
struct ProcDirEntry * CreateProcEntry(const char *name, mode_t mode, struct ProcDirEntry *parent)
create a proc node
proc 目录/文件项, @notethinking 直接叫 ProcEntry不香吗 ? 操作 /proc的 真正结构体
const struct ProcFileOperations * procFileOps
驱动程序,每个 /proc 下目录的驱动程序都不一样