CANMSG("The number of bytes requested to be written is not a multiple of\n");
CANMSG("'sizeof(struct canmsg_t)', currently this is not allowed.\n");
return -1;
- }
+ }
/* Initialize hardware pointers */
obj = canuser->msgobj;
/* If the output buffer is full, return immediately in case O_NONBLOCK
* has been specified or loop until space becomes available.
*/
- if ((ret=canque_get_inslot4id(qends, &qedge, &slot,
+ if ((ret=canque_get_inslot4id(qends, &qedge, &slot,
0, msg_buff.id, 0))<0){
DEBUGMSG("Buffer is full\n");
if(ret < -1)
if (file->f_flags & O_NONBLOCK)
return -EAGAIN;
- ret=canque_get_inslot4id_wait_kern(qends, &qedge, &slot,
+ ret=canque_get_inslot4id_wait_kern(qends, &qedge, &slot,
0, msg_buff.id, 0);
if(ret<0) {
if (signal_pending(current))
buffer += sizeof(struct canmsg_t);
bytes_to_copy = length-sizeof(struct canmsg_t);
- /*
+ /*
* Try to send more messages
*/
while (bytes_to_copy >= sizeof(struct canmsg_t)) {
/* has been dependent on "extended" option */
/* Get slot */
- if(canque_get_inslot4id(qends, &qedge, &slot,
+ if(canque_get_inslot4id(qends, &qedge, &slot,
0, msg_buff.id, 0) < 0) break;
slot->msg=msg_buff;
canque_put_inslot(qends, qedge, slot);
canque_sync_wait_kern(qends, qedge);
}
return length-bytes_to_copy;
-}
+}