From 8747f41571b66df4281139e8fd29aabeb82a7ee9 Mon Sep 17 00:00:00 2001 From: riastradh Date: Wed, 1 Jul 2020 00:42:13 +0000 Subject: [PATCH] copystr is now in libkern; don't redefine it in rumpcopy.c. Should fix build breakage from the copystr changes. --- sys/rump/librump/rumpkern/rumpcopy.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/sys/rump/librump/rumpkern/rumpcopy.c b/sys/rump/librump/rumpkern/rumpcopy.c index 71d2335e6b04..a55c5fd3f41c 100644 --- a/sys/rump/librump/rumpkern/rumpcopy.c +++ b/sys/rump/librump/rumpkern/rumpcopy.c @@ -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 -__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) {