diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-06-29 08:56:45 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-06-29 08:56:45 -0400 |
commit | 231caa1cac555bdd5cb64bf91b554b38e8ddf715 (patch) | |
tree | efe8d5567e4a4dcfcfe03fe3ea944be0e332a613 /drivers/s390/cio/chsc.c | |
parent | da039bd1e872b89e1c92c6c891c43b96d0a1bc41 (diff) |
[S390] channel measurement fix.
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>
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r-- | drivers/s390/cio/chsc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 72187e54dcac..4a9da5bdd535 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) | |||
918 | chp = to_channelpath(container_of(kobj, struct device, kobj)); | 918 | chp = to_channelpath(container_of(kobj, struct device, kobj)); |
919 | css = to_css(chp->dev.parent); | 919 | css = to_css(chp->dev.parent); |
920 | 920 | ||
921 | size = sizeof(struct cmg_chars); | 921 | size = sizeof(struct cmg_entry); |
922 | 922 | ||
923 | /* Only allow single reads. */ | 923 | /* Only allow single reads. */ |
924 | if (off || count < size) | 924 | if (off || count < size) |
925 | return 0; | 925 | return 0; |
926 | chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->id); | 926 | chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->id); |
927 | count = size; | ||
927 | return count; | 928 | return count; |
928 | } | 929 | } |
929 | 930 | ||