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 
9 #pragma once
10 
27 #include "clist.h"
28 #include "vfs.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
37 typedef struct devfs devfs_t;
38 
44 struct devfs {
46  const char *path;
48  void *private_data;
49 };
50 
57 
73 
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
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:44
void * private_data
Pointer to device driver specific data.
Definition: devfs.h:48
const char * path
File system relative path to this node.
Definition: devfs.h:46
const vfs_file_ops_t * f_op
Pointer to file operations table for this device.
Definition: devfs.h:47
clist_node_t list_entry
List item entry.
Definition: devfs.h:45
List node structure.
Definition: list.h:39
Operations on open files.
Definition: vfs.h:447
A file system driver.
Definition: vfs.h:374