IIOD: Improve parser input function
IIOD: Improve parser input function

Previously, the parser would read the characters one by one from the
input file descriptor. This worked fine if the file descriptor had
in-kernel buffering.

However, when used with USB endpoints, reading one single character
would cause bad crashes in the kernel. In fact, with USB it is not valid
to read less bytes in one read() call than the amount of data that has
been transferred by the other hand.

Signed-off-by: Paul Cercueil <73d292422978d45c9eeef455bb1b24a0db453722@analog.com>

sensarliar/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,gburca/libiio,analogdevicesinc/libiio,sensarliar/libiio,gburca/libiio,gburca/libiio,sensarliar/libiio,analogdevicesinc/libiio