copystr is now in libkern; don't redefine it in rumpcopy.c.

Should fix build breakage from the copystr changes.
This commit is contained in:
riastradh 2020-07-01 00:42:13 +00:00
parent 41b765e18c
commit 8747f41571

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpcopy.c,v 1.24 2020/04/05 15:16:11 kamil Exp $ */
/* $NetBSD: rumpcopy.c,v 1.25 2020/07/01 00:42:13 riastradh Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.24 2020/04/05 15:16:11 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.25 2020/07/01 00:42:13 riastradh Exp $");
#define __UFETCHSTORE_PRIVATE
#define __UCAS_PRIVATE
@ -83,24 +83,6 @@ copyout(const void *kaddr, void *uaddr, size_t len)
return error;
}
int
copystr(const void *kfaddr, void *kdaddr, size_t len, size_t *done)
{
uint8_t *to = kdaddr;
const uint8_t *from = kfaddr;
size_t actlen = 0;
while (len-- > 0 && (*to++ = *from++) != 0)
actlen++;
if (len+1 == 0 && *(to-1) != 0)
return ENAMETOOLONG;
if (done)
*done = actlen+1; /* + '\0' */
return 0;
}
int
copyinstr(const void *uaddr, void *kaddr, size_t len, size_t *done)
{