Removed arch_cpu_user_strncpy()/strcpy().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6698 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
775470756b
commit
510a1ab1e9
@ -141,40 +141,6 @@ error:
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_cpu_user_strcpy(char *to, const char *from, addr *fault_handler)
|
||||
{
|
||||
*fault_handler = (addr)&&error;
|
||||
|
||||
while ((*to++ = *from++) != '\0')
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_cpu_user_strncpy(char *to, const char *from, size_t size, addr *fault_handler)
|
||||
{
|
||||
*fault_handler = (addr)&&error;
|
||||
|
||||
while(size-- && (*to++ = *from++) != '\0')
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
/** \brief Copies at most (\a size - 1) characters from the string in \a from to
|
||||
* the string in \a to, NULL-terminating the result.
|
||||
*
|
||||
|
@ -148,40 +148,6 @@ error:
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_cpu_user_strcpy(char *to, const char *from, addr *fault_handler)
|
||||
{
|
||||
*fault_handler = (addr)&&error;
|
||||
|
||||
while((*to++ = *from++) != '\0')
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
|
||||
return 0;
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return ERR_VM_BAD_USER_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_cpu_user_strncpy(char *to, const char *from, size_t size, addr *fault_handler)
|
||||
{
|
||||
*fault_handler = (addr)&&error;
|
||||
|
||||
while(size-- && (*to++ = *from++) != '\0')
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
|
||||
return 0;
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return ERR_VM_BAD_USER_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_cpu_user_memset(void *s, char c, size_t count, addr *fault_handler)
|
||||
{
|
||||
|
@ -162,48 +162,6 @@ error:
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_cpu_user_strcpy(char *to, const char *from, addr *fault_handler)
|
||||
{
|
||||
*fault_handler = (addr)&&error;
|
||||
|
||||
while ((*to++ = *from++) != '\0')
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_cpu_user_strncpy(char *to, const char *from, size_t size, addr *fault_handler)
|
||||
{
|
||||
*fault_handler = (addr)&&error;
|
||||
|
||||
while(size-- && (*to++ = *from++) != '\0')
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
/*! \brief Copies at most (\a size - 1) characters from the string in \a from to
|
||||
the string in \a to, NULL-terminating the result.
|
||||
|
||||
\param to Pointer to the destination C-string.
|
||||
\param from Pointer to the source C-string.
|
||||
\param size Size in bytes of the string buffer pointed to by \a to.
|
||||
|
||||
\return strlen(\a from).
|
||||
*/
|
||||
int
|
||||
arch_cpu_user_strlcpy(char *to, const char *from, size_t size, addr *faultHandler)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user