summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-12-17 08:42:17 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-12-17 08:42:17 +0000
commit39a9f8ea1294518df837c2f6a4586c1ca61945e2 (patch)
treebbcca399b1539adf14930593f22a73cd1aea01a9 /c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
parentadaption of calling convention to console my_driver_write function (diff)
downloadrtems-39a9f8ea1294518df837c2f6a4586c1ca61945e2.tar.bz2
adapted to new prototype for *_write function
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/mbx8xx/console/console.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c b/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
index 09b1d3943b..b6148164fc 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
@@ -83,7 +83,7 @@
#include <bsp/mbx.h>
static int _EPPCBug_pollRead( int minor );
-static int _EPPCBug_pollWrite( int minor, const char *buf, int len );
+static ssize_t _EPPCBug_pollWrite( int minor, const char *buf, size_t len );
static void _BSP_output_char( char c );
static rtems_status_code do_poll_read( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
static rtems_status_code do_poll_write( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
@@ -214,16 +214,16 @@ static int _EPPCBug_pollRead(
*
* Return value: IGNORED
*/
-static int _EPPCBug_pollWrite(
+static ssize_t _EPPCBug_pollWrite(
int minor,
const char *buf,
- int len
+ size_t len
)
{
extern volatile m8xx_t m8xx;
volatile int simask;
- int i, retval;
+ int i;
ISR_Level level;
struct {
@@ -249,8 +249,6 @@ static int _EPPCBug_pollWrite(
} u;
} volatile output_params;
- retval = -1;
-
input_params.clun = 0;
input_params.reserved = 0;
@@ -315,7 +313,7 @@ static int _EPPCBug_pollWrite(
/* Return something */
m8xx.simask = simask;
_ISR_Enable( level );
- return RTEMS_SUCCESSFUL;
+ return len;
error:
m8xx.simask = simask;
@@ -422,7 +420,7 @@ static rtems_status_code do_poll_write(
#if NVRAM_CONFIGURE == 1
- int (*pollWrite)(int minor, const char *buf, int len);
+ ssize_t (*pollWrite)(int minor, const char *buf, size_t len);
if ( (nvram->console_mode & 0x06) == 0x04 )
pollWrite = _EPPCBug_pollWrite;