| 2458 | ****************************************************************************/ |
| 2459 | |
| 2460 | static int tmpfs_mkdir(FAR struct inode *mountpt, FAR const char *relpath, |
| 2461 | mode_t mode) |
| 2462 | { |
| 2463 | FAR struct tmpfs_s *fs; |
| 2464 | int ret; |
| 2465 | |
| 2466 | finfo("mountpt: %p relpath: %s mode: %04x\n", mountpt, relpath, mode); |
| 2467 | DEBUGASSERT(mountpt != NULL && relpath != NULL); |
| 2468 | |
| 2469 | /* Get the file system structure from the inode reference. */ |
| 2470 | |
| 2471 | fs = mountpt->i_private; |
| 2472 | DEBUGASSERT(fs != NULL && fs->tfs_root.tde_object != NULL); |
| 2473 | |
| 2474 | /* Get exclusive access to the file system */ |
| 2475 | |
| 2476 | ret = tmpfs_lock(fs); |
| 2477 | if (ret < 0) |
| 2478 | { |
| 2479 | return ret; |
| 2480 | } |
| 2481 | |
| 2482 | /* Create the directory. */ |
| 2483 | |
| 2484 | ret = tmpfs_create_directory(fs, relpath, NULL); |
| 2485 | tmpfs_unlock(fs); |
| 2486 | return ret; |
| 2487 | } |
| 2488 | |
| 2489 | /**************************************************************************** |
| 2490 | * Name: tmpfs_rmdir |
nothing calls this directly
no test coverage detected