diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-12-17 08:42:17 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-12-17 08:42:17 +0000 |
commit | 39a9f8ea1294518df837c2f6a4586c1ca61945e2 (patch) | |
tree | bbcca399b1539adf14930593f22a73cd1aea01a9 /c/src/lib/libbsp/m68k/gen68360/console/console.c | |
parent | adaption of calling convention to console my_driver_write function (diff) | |
download | rtems-39a9f8ea1294518df837c2f6a4586c1ca61945e2.tar.bz2 |
adapted to new prototype for *_write function
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/m68k/gen68360/console/console.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68360/console/console.c b/c/src/lib/libbsp/m68k/gen68360/console/console.c index 19bbf91c90..38e4f243e5 100644 --- a/c/src/lib/libbsp/m68k/gen68360/console/console.c +++ b/c/src/lib/libbsp/m68k/gen68360/console/console.c @@ -231,8 +231,8 @@ smc1PollRead (int minor) * Polling devices: * Transmit all characters. */ -static int -smc1InterruptWrite (int minor, const char *buf, int len) +static ssize_t +smc1InterruptWrite (int minor, const char *buf, size_t len) { smcTxBd->buffer = (char *)buf; smcTxBd->length = len; @@ -240,9 +240,10 @@ smc1InterruptWrite (int minor, const char *buf, int len) return 0; } -static int -smc1PollWrite (int minor, const char *buf, int len) +static ssize_t +smc1PollWrite (int minor, const char *buf, size_t len) { + size_t retval = len; while (len--) { static char txBuf; while (smcTxBd->status & M360_BD_READY) @@ -252,7 +253,7 @@ smc1PollWrite (int minor, const char *buf, int len) smcTxBd->length = 1; smcTxBd->status = M360_BD_READY | M360_BD_WRAP; } - return 0; + return retval; } /* |