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

Function rpmsgfs_client_mkdir

fs/rpmsgfs/rpmsgfs_client.c:847–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845}
846
847int rpmsgfs_client_mkdir(FAR void *handle, FAR const char *pathname,
848 mode_t mode)
849{
850 struct rpmsgfs_s *priv = handle;
851 struct rpmsgfs_mkdir_s *msg;
852 uint32_t space;
853 size_t len;
854
855 len = sizeof(*msg) + strlen(pathname) + 1;
856
857 msg = rpmsgfs_get_tx_payload_buffer(priv, &space);
858 if (!msg)
859 {
860 return -ENOMEM;
861 }
862
863 msg->mode = mode;
864 strlcpy(msg->pathname, pathname, space - sizeof(*msg));
865
866 return rpmsgfs_send_recv(priv, RPMSGFS_MKDIR, false,
867 (struct rpmsgfs_header_s *)msg, len, NULL);
868}
869
870int rpmsgfs_client_rmdir(FAR void *handle, FAR const char *pathname)
871{

Callers 1

rpmsgfs_mkdirFunction · 0.85

Calls 4

rpmsgfs_send_recvFunction · 0.85
strlenFunction · 0.50
strlcpyFunction · 0.50

Tested by

no test coverage detected