From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4505E719.3030405@domain.hid> Date: Mon, 11 Sep 2006 17:45:45 -0500 From: Jeff Webb MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Xenomai-help] read returns more bytes than requested? List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xenomai help I am having some success porting my RTLinux application, but I have encountered a strange error. I have this snippet of code that is reading data from an rtai-skin FIFO: result = read(runtime2io_fd, &resp, sizeof(resp)); if (result != sizeof(resp)) { printf("requested %d bytes, got %d\n", sizeof(resp), result); snprintf(err_str, MAX_STR_LEN, "cannot read response from %s", RUNTIME2IO_FIFO_DEV); sim_halt(err_str); return; } I get the following output: requested 312 bytes, got 1220 halting the sim: cannot read response from /dev/rtf1 I didn't think that a read could return more bytes than was requested. Does anyone understand this behaviour? This is code that works under RT-Linux. I am trying to determine why it is working differently under xenomai. -Jeff