| 240 | } |
| 241 | |
| 242 | static int dfs_win32_close(struct dfs_file *file) |
| 243 | { |
| 244 | if (file->flags & O_DIRECTORY) |
| 245 | { |
| 246 | WINDIR *wdirp = (WINDIR*)(file->vnode->data); |
| 247 | RT_ASSERT(wdirp != RT_NULL); |
| 248 | if (_findclose((intptr_t)wdirp->handle) == 0) { |
| 249 | free(wdirp->start); /* NOTE: here we don't use rt_free! */ |
| 250 | rt_free(wdirp); |
| 251 | return 0; |
| 252 | } |
| 253 | } |
| 254 | else /* regular file operations */ |
| 255 | { |
| 256 | if (_close((int)(file->data)) == 0) |
| 257 | return 0; |
| 258 | } |
| 259 | |
| 260 | return win32_result_to_dfs(GetLastError()); |
| 261 | } |
| 262 | |
| 263 | static int dfs_win32_ioctl(struct dfs_file *file, int cmd, void *args) |
| 264 | { |
nothing calls this directly
no test coverage detected