Skip to content

Commit

Permalink
[S390] channel measurement fix.
Browse files Browse the repository at this point in the history
Specify correct sizeof() in chp_measurement_read() and return
correct amount of read data.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Jun 29, 2006
1 parent da039bd commit 231caa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/s390/cio/chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,12 +918,13 @@ chp_measurement_read(struct kobject *kobj, char *buf, loff_t off, size_t count)
chp = to_channelpath(container_of(kobj, struct device, kobj));
css = to_css(chp->dev.parent);

size = sizeof(struct cmg_chars);
size = sizeof(struct cmg_entry);

/* Only allow single reads. */
if (off || count < size)
return 0;
chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->id);
count = size;
return count;
}

Expand Down

0 comments on commit 231caa1

Please sign in to comment.