From: Cornelia Huck Date: Thu, 29 Jun 2006 12:56:45 +0000 (+0200) Subject: [S390] channel measurement fix. X-Git-Tag: v2.6.18-rc1~360^2~23 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=231caa1cac555bdd5cb64bf91b554b38e8ddf715;p=linux-2.6 [S390] channel measurement fix. Specify correct sizeof() in chp_measurement_read() and return correct amount of read data. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 72187e54dc..4a9da5bdd5 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -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; }