copyin(9) doesn't return ENAMETOOLONG. (thanks, Jake!)
This commit is contained in:
parent
b95111df12
commit
e3b373228c
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user