copyin(9) doesn't return ENAMETOOLONG. (thanks, Jake!)

This commit is contained in:
Dag-Erling Smørgrav 2001-06-11 18:36:18 +00:00
parent b95111df12
commit e3b373228c

View File

@ -204,16 +204,8 @@ sbuf_bcopyin(struct sbuf *s, const void *uaddr, size_t len)
return (0); return (0);
if (len > (s->s_size - s->s_len - 1)) if (len > (s->s_size - s->s_len - 1))
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)) { if (copyin(uaddr, s->s_buf + s->s_len, len) != 0)
case ENAMETOOLONG: return (-1);
SBUF_SETFLAG(s, SBUF_OVERFLOWED);
/* fall through */
case 0:
s->s_len += len;
break;
default:
return (-1); /* XXX */
}
return (0); return (0);
} }