/* This function will return the name of the specified object container.  */
rt_err_t rt_object_get_name(rt_object_t object, char *name, rt_uint8_t name_size)
/* This function will return the name of the specified object container.  */
rt_err_t rt_object_get_name(rt_object_t object, char *name, rt_uint8_t name_size)
{
    rt_err_t result = -RT_EINVAL;
    if ((object != RT_NULL) && (name != RT_NULL) && (name_size != 0U))
    {
        const char *obj_name = object->name;
        (void) rt_strncpy(name, obj_name, (rt_size_t)name_size);
        result = RT_EOK;
    }
    return result;
}