1
0
mirror of https://github.com/richardghirst/PiBits.git synced 2024-11-28 12:24:11 +01:00

Fix bug in read() calculating data length

This commit is contained in:
Richard Hirst 2012-11-23 22:56:37 +00:00
parent 718ff6e4be
commit f73e2a47f4
2 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ static ssize_t dev_read(struct file *filp, char *buf, size_t count, loff_t *f_po
p += snprintf(p, end - p, "%i=%i\n", servo,
servo_pos[servo]);
}
pdata->rd_len = end - p;
pdata->rd_len = p - pdata->rd_data;
}
if (*f_pos < pdata->rd_len) {

Binary file not shown.