Update of /cvsroot/pclasses/pclasses2/src/System
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1682/src/System
Modified Files:
Makefile.am Ps2Device.linux.cpp
Added Files:
SerialDevice.linux.cpp
Log Message:
added SerialDevice and Ps2Device adaptions
Index: Makefile.am
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/System/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Makefile.am 14 Feb 2005 19:13:35 -0000 1.15
+++ Makefile.am 14 Feb 2005 20:26:00 -0000 1.16
@@ -73,7 +73,8 @@
Time_Sources = SystemClock.win32.cpp
endif
-System_Sources = CdRomDevice.linux.cpp IdeDevice.linux.cpp Ps2Device.linux.cpp
+System_Sources = CdRomDevice.linux.cpp IdeDevice.linux.cpp Ps2Device.linux.cpp \
+ SerialDevice.linux.cpp
EXTRA_DIST = CriticalSection.generic.cpp CriticalSection.win32.cpp \
Mutex.solaris.cpp Mutex.posix.cpp Mutex.win32.cpp SharedMemory.sysv.cpp \
--- NEW FILE: SerialDevice.linux.cpp ---
(This appears to be a binary file; contents omitted.)
Index: Ps2Device.linux.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/System/Ps2Device.linux.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Ps2Device.linux.cpp 14 Feb 2005 19:44:31 -0000 1.3
+++ Ps2Device.linux.cpp 14 Feb 2005 20:26:10 -0000 1.4
@@ -79,12 +79,14 @@
pfd[0].events = POLLIN;
if( poll(pfd, 1, 800) > 0 ) {
- ret = Device::read(buffer, count);
+ ret = _handle->read(buffer, count);
return ret;
- } else throw IO::IOError(errno, "Could not read from device.", P_SOURCEINFO);
-
+ }
+ else {
+ throw IO::IOError(errno, "Could not read from device.", P_SOURCEINFO);
+ }
+
return ret;
-
//return _handle->read(buffer, count);
}
|