devfs.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Eistec AB
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
24 #include "clist.h"
25 #include "vfs.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 typedef struct devfs devfs_t;
35 
41 struct devfs {
43  const char *path;
45  void *private_data;
46 };
47 
54 
70 
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
Circular linked list.
int devfs_register(devfs_t *node)
Register a node in DevFS.
int devfs_unregister(devfs_t *node)
Remove a registration from DevFS.
const vfs_file_system_t devfs_file_system
DevFS file system driver.
A device "file" consists of a file name and an opaque pointer to device driver private data.
Definition: devfs.h:41
void * private_data
Pointer to device driver specific data.
Definition: devfs.h:45
const char * path
File system relative path to this node.
Definition: devfs.h:43
const vfs_file_ops_t * f_op
Pointer to file operations table for this device.
Definition: devfs.h:44
clist_node_t list_entry
List item entry.
Definition: devfs.h:42
List node structure.
Definition: list.h:36
Operations on open files.
Definition: vfs.h:459
A file system driver.
Definition: vfs.h:386