Applied James patch that fixes can_cn4linux.c file descriptor handling and make it compatible with can_serial_hub.
<AVRStudio><MANAGEMENT><ProjectName>SlaveAVR</ProjectName><Created>16-Dec-2007 22:17:10</Created><LastEdit>07-Mar-2008 15:45:15</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>16-Dec-2007 22:17:10</Created><Version>4</Version><Build>4, 13, 0, 528</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\SlaveAVR.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\AVR-Studio\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>AT90CAN128</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0><Variables>Read_Inputs_8_Bit</Variables><Variables>Interrupt_Mask_Any_Change_8_Bit</Variables><Variables>Interrupt_Mask_Low_to_High_8_Bit</Variables><Variables>Interrupt_Mask_High_to_Low_8_Bit</Variables><Variables>transmission</Variables></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\drivers\AVR\can_AVR.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\dcf.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\timer.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\emcy.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\lifegrd.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\lss.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\nmtMaster.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\nmtSlave.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\objacces.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\pdo.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\sdo.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\states.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\sync.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\drivers\AVR\timer_AVR.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\ObjDict.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\main.c</SOURCEFILE><SOURCEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\ds401.c</SOURCEFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\timers_driver.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\can.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\can_driver.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\data.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\dcf.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\def.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\emcy.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\lifegrd.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\lss.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\nmtMaster.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\nmtSlave.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\objacces.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\objdictdef.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\pdo.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\sdo.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\states.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\sync.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\sysdep.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\timer.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\AVR\timerscfg.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\AVR\applicfg.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\AVR\can_AVR.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\AVR\can_drv.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\AVR\canfestival.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\AVR\config.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\include\AVR\iar.h</HEADERFILE><HEADERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\ObjDict.h</HEADERFILE><OTHERFILE>default\SlaveAVR.lss</OTHERFILE><OTHERFILE>default\SlaveAVR.map</OTHERFILE><OTHERFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\Makefile</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>YES</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\Makefile</EXTERNALMAKEFILE><PART>at90can128</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>SlaveAVR.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\drivers\AVR\can_AVR.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\drivers\AVR\timer_AVR.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\ObjDict.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\main.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\dcf.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\emcy.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\lifegrd.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\lss.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\nmtMaster.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\nmtSlave.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\objacces.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\pdo.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\sdo.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\states.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\sync.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>I:\Entwicklung\Firmware\CAN\CanFestival-3\src\timer.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS><INCLUDE>..\..\..\..\include\</INCLUDE><INCLUDE>..\..\..\..\include\AVR\</INCLUDE><INCLUDE>.\</INCLUDE></INCDIRS><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -Os -fsigned-char -fpack-struct</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\programme\WinAVR\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\programme\WinAVR\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><JTAGICEmkII><DAISY_CHAIN>0</DAISY_CHAIN><DEVS_BEFORE>0</DEVS_BEFORE><DEVS_AFTER>0</DEVS_AFTER><INSTRBITS_BEFORE>0</INSTRBITS_BEFORE><INSTRBITS_AFTER>0</INSTRBITS_AFTER><BAUDRATE>19200</BAUDRATE><JTAG_FREQ>8000000</JTAG_FREQ><TIMERS_RUNNING>0</TIMERS_RUNNING><PRESERVE_EEPROM>1</PRESERVE_EEPROM><ALWAYS_EXT_RESET>0</ALWAYS_EXT_RESET><PRINT_BRK_CAUSE>0</PRINT_BRK_CAUSE><ENABLE_IDR_IN_RUN_MODE>0</ENABLE_IDR_IN_RUN_MODE><ALLOW_BRK_INSTR>1</ALLOW_BRK_INSTR><STOPIF_ENTRYFUNC_NOTFOUND>1</STOPIF_ENTRYFUNC_NOTFOUND><ENTRY_FUNCTION>main</ENTRY_FUNCTION><REPROGRAM>2</REPROGRAM></JTAGICEmkII><AVRSimulator><FuseExt>0</FuseExt><FuseHigh>138</FuseHigh><FuseLow>56</FuseLow><LockBits>123</LockBits><Frequency>8000000</Frequency><ExtSRAM>0</ExtSRAM><SimBoot>1</SimBoot><SimBootnew>1</SimBootnew></AVRSimulator><IOView><usergroups/><sort sorted="1" column="1" ordername="1" orderaddress="0" ordergroup="1"/></IOView><Files><File00000><FileId>00000</FileId><FileName>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\main.c</FileName><Status>1</Status></File00000><File00001><FileId>00001</FileId><FileName>I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\Makefile</FileName><Status>1</Status></File00001><File00002><FileId>00002</FileId><FileName>default\Makefile</FileName><Status>1</Status></File00002></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>