From b21baf0f699fae4c64f7c18381c7a68b3f2b742e Mon Sep 17 00:00:00 2001 From: des Date: Mon, 11 Jun 2001 18:36:18 +0000 Subject: [PATCH] copyin(9) doesn't return ENAMETOOLONG. (thanks, Jake!) --- sys/kern/subr_sbuf.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index 0493aefb6e6b..ea05f8b16110 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -204,16 +204,8 @@ sbuf_bcopyin(struct sbuf *s, const void *uaddr, size_t len) return (0); if (len > (s->s_size - s->s_len - 1)) len = s->s_size - s->s_len - 1; - switch (copyin(uaddr, s->s_buf + s->s_len, len)) { - case ENAMETOOLONG: - SBUF_SETFLAG(s, SBUF_OVERFLOWED); - /* fall through */ - case 0: - s->s_len += len; - break; - default: - return (-1); /* XXX */ - } + if (copyin(uaddr, s->s_buf + s->s_len, len) != 0) + return (-1); return (0); }