| 1512 | ****************************************************************************/ |
| 1513 | |
| 1514 | static int rpmsgfs_chstat(FAR struct inode *mountpt, FAR const char *relpath, |
| 1515 | FAR const struct stat *buf, int flags) |
| 1516 | { |
| 1517 | FAR struct rpmsgfs_mountpt_s *fs; |
| 1518 | FAR char *path; |
| 1519 | int ret; |
| 1520 | |
| 1521 | /* Sanity checks */ |
| 1522 | |
| 1523 | DEBUGASSERT(mountpt && mountpt->i_private); |
| 1524 | |
| 1525 | /* Get the mountpoint private data from the inode structure */ |
| 1526 | |
| 1527 | fs = mountpt->i_private; |
| 1528 | |
| 1529 | path = lib_get_pathbuffer(); |
| 1530 | if (path == NULL) |
| 1531 | { |
| 1532 | return -ENOMEM; |
| 1533 | } |
| 1534 | |
| 1535 | ret = nxmutex_lock(&fs->fs_lock); |
| 1536 | if (ret < 0) |
| 1537 | { |
| 1538 | lib_put_pathbuffer(path); |
| 1539 | return ret; |
| 1540 | } |
| 1541 | |
| 1542 | /* Append to the host's root directory */ |
| 1543 | |
| 1544 | rpmsgfs_mkpath(fs, relpath, path, PATH_MAX); |
| 1545 | |
| 1546 | /* Call the host FS to do the chstat operation */ |
| 1547 | |
| 1548 | ret = rpmsgfs_client_chstat(fs->handle, path, buf, flags); |
| 1549 | |
| 1550 | nxmutex_unlock(&fs->fs_lock); |
| 1551 | lib_put_pathbuffer(path); |
| 1552 | return ret; |
| 1553 | } |
nothing calls this directly
no test coverage detected