<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
In my RTEMS driver I set and return error value by following macro:<br>
<br>
<font face="Courier New">rtems_set_errno_and_return_minus_one(EALREADY);<br>
</font><br>
But in my rtems app when I print the error out by:<br>
<br>
<font face="Courier New">fd = open(RTEMS_SYSFLASH_DEVICE_NAME, O_RDWR); <br>
if(fd < 0) {<br>
printk("Couldn't Open device (%d:%d:%s).", fd, errno, strerror(errno));<br>
exit(-1);<br>
}</font><br>
<br>
<b>OUTPUT:</b> <font face="Courier New">Couldn't Open device (-1:22:Invalid argument).<br>
<br>
<font face="Tahoma">No matter what errno value i set I always get the same (22: Invalid
</font>argument). I don't understand why. Any help would be appreciated.<br>
<br>
Regards,<br>
Indy<br>
</font></div>
</body>
</html>