git-svn-id: svn://db.shs.com.ru/pip@351 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-04-14 10:56:50 +00:00
parent 7f67db8c44
commit 861ce422c4
5 changed files with 11 additions and 48 deletions

View File

@@ -786,7 +786,6 @@ PIStringList PISerial::availableDevices(bool test) {
--i;
continue;
}
int void_ = 0;
bool rok = true;
#ifdef WINDOWS
/*COMMTIMEOUTS times;
@@ -799,6 +798,7 @@ PIStringList PISerial::availableDevices(bool test) {
if (ReadFile(hComm, &void_, 1, &readed_, 0) == 0)
rok = GetLastError() == ;*/
#else
int void_ = 0;
fcntl(fd, F_SETFL, O_NONBLOCK);
if (::read(fd, &void_, 1) == -1)
rok = errno != EIO;