Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73555
b: refs/heads/master
c: 1200e64
h: refs/heads/master
i:
  73553: cf1a694
  73551: ea7d4ef
v: v3
  • Loading branch information
Anthony Liguori authored and Rusty Russell committed Nov 12, 2007
1 parent bc8603f commit 6af4abb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1bc4953ed44454c7f53d0b609445d1534981ee75
refs/heads/master: 1200e646ae238afc536be70257290eb33fb6e364
8 changes: 4 additions & 4 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ static bool service_io(struct device *dev)
if (out->type & VIRTIO_BLK_T_SCSI_CMD) {
fprintf(stderr, "Scsi commands unsupported\n");
in->status = VIRTIO_BLK_S_UNSUPP;
wlen = sizeof(in);
wlen = sizeof(*in);
} else if (out->type & VIRTIO_BLK_T_OUT) {
/* Write */

Expand All @@ -1363,7 +1363,7 @@ static bool service_io(struct device *dev)
/* Die, bad Guest, die. */
errx(1, "Write past end %llu+%u", off, ret);
}
wlen = sizeof(in);
wlen = sizeof(*in);
in->status = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR);
} else {
/* Read */
Expand All @@ -1376,10 +1376,10 @@ static bool service_io(struct device *dev)
ret = readv(vblk->fd, iov+1, in_num-1);
verbose("READ from sector %llu: %i\n", out->sector, ret);
if (ret >= 0) {
wlen = sizeof(in) + ret;
wlen = sizeof(*in) + ret;
in->status = VIRTIO_BLK_S_OK;
} else {
wlen = sizeof(in);
wlen = sizeof(*in);
in->status = VIRTIO_BLK_S_IOERR;
}
}
Expand Down

0 comments on commit 6af4abb

Please sign in to comment.