This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c28a76d812a4f8d8aacc8470177606b3d0b4e27c Author: chenzihan1 <[email protected]> AuthorDate: Wed Nov 18 23:07:31 2026 +0800 drivers/rpmsg/rpmsg_char: prefix the endpoint name with "rpmsg-raw-" The Linux rpmsg_char driver binds to the "rpmsg-raw" service. Create the endpoint as "rpmsg-raw-<name>" so that a NuttX rpmsg char endpoint and a Linux one find each other through the name service. Signed-off-by: chenzihan1 <[email protected]> Signed-off-by: Bowen Wang <[email protected]> --- drivers/rpmsg/rpmsg_char.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c index a4d119bda84..45304ca316e 100644 --- a/drivers/rpmsg/rpmsg_char.c +++ b/drivers/rpmsg/rpmsg_char.c @@ -42,6 +42,12 @@ #include "rpmsg.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define RPMSG_CHAR_NAME_PREFIX "rpmsg-raw-" + /**************************************************************************** * Private Types ****************************************************************************/ @@ -515,6 +521,7 @@ static void rpmsg_eptdev_device_created(FAR struct rpmsg_device *rdev, FAR struct rpmsg_eptdev_s *eptdev = (FAR struct rpmsg_eptdev_s *)priv; FAR struct rpmsg_endpoint_info *info = &eptdev->info; FAR struct rpmsg_char_s *chr = eptdev->chr; + char name[RPMSG_NAME_SIZE]; char path[PATH_MAX]; int ret; @@ -524,7 +531,10 @@ static void rpmsg_eptdev_device_created(FAR struct rpmsg_device *rdev, eptdev->ept.priv = eptdev; eptdev->ept.release_cb = rpmsg_eptdev_release_cb; eptdev->ept.ns_bound_cb = rpmsg_eptdev_ns_bound_cb; - ret = rpmsg_create_ept(&eptdev->ept, rdev, info->name, info->src, + strlcpy(name, RPMSG_CHAR_NAME_PREFIX, RPMSG_NAME_SIZE); + strlcat(name, info->name, RPMSG_NAME_SIZE); + + ret = rpmsg_create_ept(&eptdev->ept, rdev, name, info->src, info->dst, rpmsg_eptdev_ept_cb, rpmsg_eptdev_ns_unbind_cb); if (ret >= 0)
