1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00
This commit is contained in:
Julian Barathieu 2019-05-07 23:21:02 +02:00
parent 39e46a072f
commit 821b3b26c6

View File

@ -31,7 +31,7 @@ error_t BGetFromBuf(Buffer_t *buf, uchar *ch)
assert(buf && buf->initDone == INITOK);
if (!buf) return EINVAL;
if (buf->state != BS_RDWR && buf->state != BS_RDONLY) {
if (buf->flags & BUF_TERM || buf->state != BS_RDWR && buf->state != BS_RDONLY) {
return EBADF;
}
@ -47,6 +47,12 @@ error_t bgetc(Buffer_t *buf, uchar *ch)
if (buf->flags & (BF_EOF|BF_ERR)) return EENDF;
return EOK;
if (
if (rc != EOK) {
// buf->flags |= BF_ERR;
}
return rc;
}