* @brief Set specific flags for a dfs_mnt structure instance. * * This function sets specific flags for the given dfs_mnt structure. * If the MS_RDONLY flag is included in the input flags, it sets the MNT_RDONLY flag * for the mount point and cleans the page cache if the page cache feature is enabled. * * @param[in,out] mnt Pointer to the dfs_mnt structure for which flags are to be set. *
| 388 | * @return returns 0 to indicate success. |
| 389 | */ |
| 390 | int dfs_mnt_setflags(struct dfs_mnt *mnt, int flags) |
| 391 | { |
| 392 | int error = 0; |
| 393 | |
| 394 | if (flags & MS_RDONLY) |
| 395 | { |
| 396 | mnt->flags |= MNT_RDONLY; |
| 397 | #ifdef RT_USING_PAGECACHE |
| 398 | dfs_pcache_clean(mnt); |
| 399 | #endif |
| 400 | } |
| 401 | |
| 402 | return error; |
| 403 | } |
| 404 | |
| 405 | /** |
| 406 | * @brief Destroy a dfs_mnt structure instance and unmount it if necessary. |
no test coverage detected