syscall: rename z_user_string_nlen -> k_usermode_string_nlen
Rename internal API to not use z_/Z_. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
3ab356604d
commit
70e791905d
|
@ -200,7 +200,7 @@ void k_object_recycle(const void *obj);
|
||||||
* maxlen if there were no NULL terminating characters within the
|
* maxlen if there were no NULL terminating characters within the
|
||||||
* first maxlen bytes.
|
* first maxlen bytes.
|
||||||
*/
|
*/
|
||||||
static inline size_t z_user_string_nlen(const char *src, size_t maxlen,
|
static inline size_t k_usermode_string_nlen(const char *src, size_t maxlen,
|
||||||
int *err)
|
int *err)
|
||||||
{
|
{
|
||||||
return arch_user_string_nlen(src, maxlen, err);
|
return arch_user_string_nlen(src, maxlen, err);
|
||||||
|
|
|
@ -858,7 +858,7 @@ char *z_user_string_alloc_copy(const char *src, size_t maxlen)
|
||||||
int err;
|
int err;
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
|
|
||||||
actual_len = z_user_string_nlen(src, maxlen, &err);
|
actual_len = k_usermode_string_nlen(src, maxlen, &err);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,7 @@ int z_user_string_copy(char *dst, const char *src, size_t maxlen)
|
||||||
size_t actual_len;
|
size_t actual_len;
|
||||||
int ret, err;
|
int ret, err;
|
||||||
|
|
||||||
actual_len = z_user_string_nlen(src, maxlen, &err);
|
actual_len = k_usermode_string_nlen(src, maxlen, &err);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
ret = EFAULT;
|
ret = EFAULT;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -46,7 +46,7 @@ void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
|
||||||
|
|
||||||
size_t z_impl_string_nlen(char *src, size_t maxlen, int *err)
|
size_t z_impl_string_nlen(char *src, size_t maxlen, int *err)
|
||||||
{
|
{
|
||||||
return z_user_string_nlen(src, maxlen, err);
|
return k_usermode_string_nlen(src, maxlen, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t z_vrfy_string_nlen(char *src, size_t maxlen, int *err)
|
static inline size_t z_vrfy_string_nlen(char *src, size_t maxlen, int *err)
|
||||||
|
@ -193,14 +193,14 @@ static inline uint32_t z_vrfy_more_args(uint32_t arg1, uint32_t arg2,
|
||||||
#include <syscalls/more_args_mrsh.c>
|
#include <syscalls/more_args_mrsh.c>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Test to demonstrate usage of z_user_string_nlen()
|
* @brief Test to demonstrate usage of k_usermode_string_nlen()
|
||||||
*
|
*
|
||||||
* @details The test will be called from user mode and kernel
|
* @details The test will be called from user mode and kernel
|
||||||
* mode to check the behavior of z_user_string_nlen()
|
* mode to check the behavior of k_usermode_string_nlen()
|
||||||
*
|
*
|
||||||
* @ingroup kernel_memprotect_tests
|
* @ingroup kernel_memprotect_tests
|
||||||
*
|
*
|
||||||
* @see z_user_string_nlen()
|
* @see k_usermode_string_nlen()
|
||||||
*/
|
*/
|
||||||
ZTEST_USER(syscalls, test_string_nlen)
|
ZTEST_USER(syscalls, test_string_nlen)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue