9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b25ce9afc440777a92a36fb4e47817b37c49f859
parent acce5499735e62c93f8383df281037b16f76b753
Author: Roberto Vargas <roberto.vargas@arm.com>
Date:   Tue,  5 Mar 2019 12:32:06 +0000

[dev] Fix blobread()

It was passing not initialized values to buf2chan().

Change-Id: Iee785cf7765b63abc607ac03e059f8ca1d3bc740

Diffstat:
Mdrivers/devblob.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/devblob.c b/drivers/devblob.c @@ -53,14 +53,16 @@ blobstatus(Chan *c, void *buf, int n) static int blobread(Chan *c, void *buf, int n) { + Qid qid = c->qid & ~CHDIR; Dirtab *dp; - switch (c->qid & ~CHDIR) { + switch (qid) { case Qblobfs: return dirread(c, buf, n, blobfstab, nblobs+1, devgen); case Qctl: return blobstatus(c, buf, n); default: + dp = &blobfstab[qid - 1]; return buf2chan(c, buf, dp->data, n, dp->length); } }