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

Function proc_create_data

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

* @brief Make a file * * @param name fullpath based on _proc_root or parent * @param mode permission configuration * @param parent can be empty * @param fops * @param data * * @return dentry */

Source from the content-addressed store, hash-verified

376 * @return dentry
377 */
378struct proc_dentry *proc_create_data(const char *name, mode_t mode, struct proc_dentry *parent,
379 const struct dfs_file_ops *fops, void *data)
380{
381 struct proc_dentry *dentry, *_parent = parent;
382
383 dentry = proc_create_reg(name, mode, &_parent);
384 if (dentry)
385 {
386 dentry->fops = fops ? fops : &proc_file_ops;
387 dentry->data = data;
388
389 dentry = proc_register(_parent, dentry);
390 }
391 proc_release(_parent);
392
393 return dentry;
394}
395
396/**
397 * @brief Make a file

Callers 11

pci_procfs_attachFunction · 0.85
proc_cpuinfo_initFunction · 0.85
proc_mounts_initFunction · 0.85
proc_devices_initFunction · 0.85
proc_filesystems_initFunction · 0.85
proc_stat_initFunction · 0.85
proc_tty_initFunction · 0.85
proc_net_initFunction · 0.85
proc_partitions_initFunction · 0.85
msh_proc_echoFunction · 0.85
proc_pidFunction · 0.85

Calls 3

proc_create_regFunction · 0.85
proc_registerFunction · 0.85
proc_releaseFunction · 0.85

Tested by

no test coverage detected