| 1 |
.. _filters.h: |
| 2 |
|
| 3 |
**filters.h** |
| 4 |
|
| 5 |
|
| 6 |
libnvme directory filter |
| 7 |
|
| 8 |
.. c:function:: int nvme_namespace_filter (const struct dirent *d) |
| 9 |
|
| 10 |
Filter for namespaces |
| 11 |
|
| 12 |
**Parameters** |
| 13 |
|
| 14 |
``const struct dirent *d`` |
| 15 |
dirent to check |
| 16 |
|
| 17 |
**Return** |
| 18 |
|
| 19 |
1 if **d** matches, 0 otherwise |
| 20 |
|
| 21 |
|
| 22 |
.. c:function:: int nvme_paths_filter (const struct dirent *d) |
| 23 |
|
| 24 |
Filter for paths |
| 25 |
|
| 26 |
**Parameters** |
| 27 |
|
| 28 |
``const struct dirent *d`` |
| 29 |
dirent to check |
| 30 |
|
| 31 |
**Return** |
| 32 |
|
| 33 |
1 if **d** matches, 0 otherwise |
| 34 |
|
| 35 |
|
| 36 |
.. c:function:: int nvme_ctrls_filter (const struct dirent *d) |
| 37 |
|
| 38 |
Filter for controllers |
| 39 |
|
| 40 |
**Parameters** |
| 41 |
|
| 42 |
``const struct dirent *d`` |
| 43 |
dirent to check |
| 44 |
|
| 45 |
**Return** |
| 46 |
|
| 47 |
1 if **d** matches, 0 otherwise |
| 48 |
|
| 49 |
|
| 50 |
.. c:function:: int nvme_subsys_filter (const struct dirent *d) |
| 51 |
|
| 52 |
Filter for subsystems |
| 53 |
|
| 54 |
**Parameters** |
| 55 |
|
| 56 |
``const struct dirent *d`` |
| 57 |
dirent to check |
| 58 |
|
| 59 |
**Return** |
| 60 |
|
| 61 |
1 if **d** matches, 0 otherwise |
| 62 |
|
| 63 |
|
| 64 |
.. c:function:: int nvme_scan_subsystems (struct dirent ***subsys) |
| 65 |
|
| 66 |
Scan for subsystems |
| 67 |
|
| 68 |
**Parameters** |
| 69 |
|
| 70 |
``struct dirent ***subsys`` |
| 71 |
Pointer to array of dirents |
| 72 |
|
| 73 |
**Return** |
| 74 |
|
| 75 |
number of entries in **subsys** |
| 76 |
|
| 77 |
|
| 78 |
.. c:function:: int nvme_scan_subsystem_namespaces (nvme_subsystem_t s, struct dirent ***ns) |
| 79 |
|
| 80 |
Scan for namespaces in a subsystem |
| 81 |
|
| 82 |
**Parameters** |
| 83 |
|
| 84 |
``nvme_subsystem_t s`` |
| 85 |
Subsystem to scan |
| 86 |
|
| 87 |
``struct dirent ***ns`` |
| 88 |
Pointer to array of dirents |
| 89 |
|
| 90 |
**Return** |
| 91 |
|
| 92 |
number of entries in **ns** |
| 93 |
|
| 94 |
|
| 95 |
.. c:function:: int nvme_scan_ctrls (struct dirent ***ctrls) |
| 96 |
|
| 97 |
Scan for controllers |
| 98 |
|
| 99 |
**Parameters** |
| 100 |
|
| 101 |
``struct dirent ***ctrls`` |
| 102 |
Pointer to array of dirents |
| 103 |
|
| 104 |
**Return** |
| 105 |
|
| 106 |
number of entries in **ctrls** |
| 107 |
|
| 108 |
|
| 109 |
.. c:function:: int nvme_scan_ctrl_namespace_paths (nvme_ctrl_t c, struct dirent ***paths) |
| 110 |
|
| 111 |
Scan for namespace paths in a controller |
| 112 |
|
| 113 |
**Parameters** |
| 114 |
|
| 115 |
``nvme_ctrl_t c`` |
| 116 |
Controller to scan |
| 117 |
|
| 118 |
``struct dirent ***paths`` |
| 119 |
Pointer to array of dirents |
| 120 |
|
| 121 |
**Return** |
| 122 |
|
| 123 |
number of entries in **paths** |
| 124 |
|
| 125 |
|
| 126 |
.. c:function:: int nvme_scan_ctrl_namespaces (nvme_ctrl_t c, struct dirent ***ns) |
| 127 |
|
| 128 |
Scan for namespaces in a controller |
| 129 |
|
| 130 |
**Parameters** |
| 131 |
|
| 132 |
``nvme_ctrl_t c`` |
| 133 |
Controller to scan |
| 134 |
|
| 135 |
``struct dirent ***ns`` |
| 136 |
Pointer to array of dirents |
| 137 |
|
| 138 |
**Return** |
| 139 |
|
| 140 |
number of entries in **ns** |
| 141 |
|
| 142 |
|
| 143 |
.. c:function:: int nvme_scan_ns_head_paths (nvme_ns_head_t head, struct dirent ***paths) |
| 144 |
|
| 145 |
Scan for namespace paths |
| 146 |
|
| 147 |
**Parameters** |
| 148 |
|
| 149 |
``nvme_ns_head_t head`` |
| 150 |
Namespace head node to scan |
| 151 |
|
| 152 |
``struct dirent ***paths`` |
| 153 |
Pointer to array of dirents |
| 154 |
|
| 155 |
**Return** |
| 156 |
|
| 157 |
number of entries in **ents** |
| 158 |
|
| 159 |
|