From 231caa1cac555bdd5cb64bf91b554b38e8ddf715 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Thu, 29 Jun 2006 14:56:45 +0200 Subject: [PATCH] [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 --- drivers/s390/cio/chsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.5