devfs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Eistec AB
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
25 #ifndef DEVFS_H_
26 #define DEVFS_H_
27 
28 #include "clist.h"
29 #include "vfs.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
38 typedef struct devfs devfs_t;
39 
45 struct devfs {
47  const char *path;
49  void *private_data;
50 };
51 
58 
73 int devfs_register(devfs_t *node);
74 
86 int devfs_unregister(devfs_t *node);
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif
93 
clist_node_t list_entry
List item entry.
Definition: devfs.h:46
const vfs_file_ops_t * f_op
Pointer to file operations table for this device.
Definition: devfs.h:48
int devfs_register(devfs_t *node)
Register a node in DevFS.
VFS layer API declarations.
const vfs_file_system_t devfs_file_system
DevFS file system driver.
int devfs_unregister(devfs_t *node)
Remove a registration from DevFS.
A device "file" consists of a file name and an opaque pointer to device driver private data...
Definition: devfs.h:45
void * private_data
Pointer to device driver specific data.
Definition: devfs.h:49
List node structure.
Definition: list.h:40
const char * path
File system relative path to this node.
Definition: devfs.h:47
Operations on open files.
Definition: vfs.h:234
Circular linked list.
A file system driver.
Definition: vfs.h:163