···1007// applications that one cannot break out of.1008//******************************************************************************1009static int1010-i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user )1011{1012 i2eBordStrPtr pB;1013 unsigned char *pInsert;···10201021 int bailout = 10;10221023- ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count, user );10241025 // Ensure channel structure seems real1026 if ( !i2Validate ( pCh ) ) ···1087 DATA_COUNT_OF(pInsert) = amountToMove;10881089 // Move the data1090- if ( user ) {1091- rc = copy_from_user((char*)(DATA_OF(pInsert)), pSource,1092- amountToMove );1093- } else {1094- memcpy( (char*)(DATA_OF(pInsert)), pSource, amountToMove );1095- }1096 // Adjust pointers and indices1097 pSource += amountToMove;1098 pCh->Obuf_char_count += amountToMove;
···1007// applications that one cannot break out of.1008//******************************************************************************1009static int1010+i2Output(i2ChanStrPtr pCh, const char *pSource, int count)1011{1012 i2eBordStrPtr pB;1013 unsigned char *pInsert;···10201021 int bailout = 10;10221023+ ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count, 0 );10241025 // Ensure channel structure seems real1026 if ( !i2Validate ( pCh ) ) ···1087 DATA_COUNT_OF(pInsert) = amountToMove;10881089 // Move the data1090+ memcpy( (char*)(DATA_OF(pInsert)), pSource, amountToMove );000001091 // Adjust pointers and indices1092 pSource += amountToMove;1093 pCh->Obuf_char_count += amountToMove;
+1-1
drivers/char/ip2/i2lib.h
···332static int i2GetStatus(i2ChanStrPtr, int);333static int i2Input(i2ChanStrPtr);334static int i2InputFlush(i2ChanStrPtr);335-static int i2Output(i2ChanStrPtr, const char *, int, int);336static int i2OutputFree(i2ChanStrPtr);337static int i2ServiceBoard(i2eBordStrPtr);338static void i2DrainOutput(i2ChanStrPtr, int);
···332static int i2GetStatus(i2ChanStrPtr, int);333static int i2Input(i2ChanStrPtr);334static int i2InputFlush(i2ChanStrPtr);335+static int i2Output(i2ChanStrPtr, const char *, int);336static int i2OutputFree(i2ChanStrPtr);337static int i2ServiceBoard(i2eBordStrPtr);338static void i2DrainOutput(i2ChanStrPtr, int);
+2-2
drivers/char/ip2/ip2main.c
···17041705 /* This is the actual move bit. Make sure it does what we need!!!!! */1706 WRITE_LOCK_IRQSAVE(&pCh->Pbuf_spinlock,flags);1707- bytesSent = i2Output( pCh, pData, count, 0 );1708 WRITE_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags);17091710 ip2trace (CHANN, ITRC_WRITE, ITRC_RETURN, 1, bytesSent );···1764 //1765 // We may need to restart i2Output if it does not fullfill this request1766 //1767- strip = i2Output( pCh, pCh->Pbuf, pCh->Pbuf_stuff, 0 );1768 if ( strip != pCh->Pbuf_stuff ) {1769 memmove( pCh->Pbuf, &pCh->Pbuf[strip], pCh->Pbuf_stuff - strip );1770 }
···17041705 /* This is the actual move bit. Make sure it does what we need!!!!! */1706 WRITE_LOCK_IRQSAVE(&pCh->Pbuf_spinlock,flags);1707+ bytesSent = i2Output( pCh, pData, count);1708 WRITE_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags);17091710 ip2trace (CHANN, ITRC_WRITE, ITRC_RETURN, 1, bytesSent );···1764 //1765 // We may need to restart i2Output if it does not fullfill this request1766 //1767+ strip = i2Output( pCh, pCh->Pbuf, pCh->Pbuf_stuff);1768 if ( strip != pCh->Pbuf_stuff ) {1769 memmove( pCh->Pbuf, &pCh->Pbuf[strip], pCh->Pbuf_stuff - strip );1770 }