src/tap/cable/gpio.c (gpio_get_value): Replace read/lseek with pread.

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1834 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent bb7af9534a
commit 018c1d8cfc

@ -4,6 +4,8 @@
the gpio value. Also assume the gpio layer only has a value of '0' or '1'.
Work by Frans Meulenbroeks.
* src/tap/cable/gpio.c (gpio_get_value): Replace read/lseek with pread.
2010-08-24 Mike Frysinger <vapier@gentoo.org>
* src/tap/cable/gpio.c (gpio_get_value): Need to seek back to the start of

@ -133,8 +133,7 @@ static int gpio_get_value (int fd, unsigned int gpio)
ssize_t ret;
char value;
ret = read (fd, &value, 1);
lseek (fd, 0, SEEK_SET);
ret = pread (fd, &value, 1, 0);
if (ret != 1)
{

Loading…
Cancel
Save