diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 568c0038..39c0ea68 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -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 * src/tap/cable/gpio.c (gpio_get_value): Need to seek back to the start of diff --git a/urjtag/src/tap/cable/gpio.c b/urjtag/src/tap/cable/gpio.c index f02fdead..edb88174 100644 --- a/urjtag/src/tap/cable/gpio.c +++ b/urjtag/src/tap/cable/gpio.c @@ -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) {