MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / proc_create_reg

Function proc_create_reg

components/dfs/dfs_v2/filesystems/procfs/proc.c:349–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349static struct proc_dentry *proc_create_reg(const char *name, mode_t mode, struct proc_dentry **parent)
350{
351 struct proc_dentry *dentry = RT_NULL;
352
353 if ((mode & S_IFMT) == 0)
354 mode |= S_IFREG;
355 if ((mode & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)) == 0)
356 mode |= S_IRUSR | S_IRGRP | S_IROTH;
357
358 if (!S_ISREG(mode))
359 {
360 *parent = RT_NULL;
361 return dentry;
362 }
363
364 return proc_create(parent, name, mode);
365}
366
367/**
368 * @brief Make a file

Callers 2

proc_create_dataFunction · 0.85
proc_create_single_dataFunction · 0.85

Calls 1

proc_createFunction · 0.85

Tested by

no test coverage detected