MCPcopy Create free account
hub / github.com/apache/nuttx / rpmsgfs_client_unlink

Function rpmsgfs_client_unlink

fs/rpmsgfs/rpmsgfs_client.c:824–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

822}
823
824int rpmsgfs_client_unlink(FAR void *handle, FAR const char *pathname)
825{
826 struct rpmsgfs_s *priv = handle;
827 struct rpmsgfs_unlink_s *msg;
828 uint32_t space;
829 size_t len;
830
831 len = sizeof(*msg) + strlen(pathname) + 1;
832
833 msg = rpmsgfs_get_tx_payload_buffer(priv, &space);
834 if (!msg)
835 {
836 return -ENOMEM;
837 }
838
839 DEBUGASSERT(len <= space);
840
841 strlcpy(msg->pathname, pathname, space - sizeof(*msg));
842
843 return rpmsgfs_send_recv(priv, RPMSGFS_UNLINK, false,
844 (struct rpmsgfs_header_s *)msg, len, NULL);
845}
846
847int rpmsgfs_client_mkdir(FAR void *handle, FAR const char *pathname,
848 mode_t mode)

Callers 1

rpmsgfs_unlinkFunction · 0.85

Calls 4

rpmsgfs_send_recvFunction · 0.85
strlenFunction · 0.50
strlcpyFunction · 0.50

Tested by

no test coverage detected