summaryrefslogtreecommitdiff
path: root/csum.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-10-28 07:39:26 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-10-28 09:31:58 +0100
commitc3b1504c716b7a91d8d1563aed6b9f766dc27e3f (patch)
tree215c8596bc5109717c1605d52ae70e00a46e667a /csum.h
parente3822bdbd11f1546b002f00cc018a612e2f3d3e5 (diff)
flowtop: Add command-line option to show rates in bits
Add -b,--bits command line option to show rates in bits/s instead of bytes/s. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'csum.h')
0 files changed, 0 insertions, 0 deletions
o result buffer from the caller of function sensor_hub_get_feature. By default the value extracted from a field is 4 bytes from hid core (using hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT)), even if report size if less than 4 byte. So when we copy data to user buffer in sensor_hub_get_feature, we need to only copy report size bytes even when report count is more than 1. This is not an issue for most of the sensor hub fields as report count will be 1 where we already copy only report size bytes, but some string fields like description, it is a problem as the report count will be more than 1. For example: Field(6) Physical(Sensor.OtherCustom) Application(Sensor.Sensor) Usage(11) Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Report Size(16) Report Count(11) Here since the report size is 2 bytes, we will have 2 additional bytes of 0s copied into user buffer, if we directly copy to user buffer from report->field[]->value This change will copy report size bytes into the buffer of caller for each usage report->field[]->value. So for example without this change, the data displayed for a custom sensor field "sensor-model": 76 00 101 00 110 00 111 00 118 00 111 (truncated to report count of 11) With change 76 101 110 111 118 111 32 89 111 103 97 ("Lenovo Yoga" in ASCII ) Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'Documentation/iostats.txt')