diff options
| author | bernard <[email protected]> | 2014-06-25 17:20:57 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2014-06-25 17:20:57 +0800 |
| commit | a58593f784d4b84ce09f194c15bc79e20a80aa6a (patch) | |
| tree | ba4ba3eccffbb10973e3ebabc7b3226004cff408 /components | |
| parent | bab17630030fc08601cec40b90b74c7a36d298ca (diff) | |
[libc] code cleanup.
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/armlibc/stubs.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/components/libc/armlibc/stubs.c b/components/libc/armlibc/stubs.c index 301f654182..d219b3430a 100644 --- a/components/libc/armlibc/stubs.c +++ b/components/libc/armlibc/stubs.c @@ -46,8 +46,10 @@ const char __stderr_name[] = "STDERR"; */ FILEHANDLE _sys_open(const char *name, int openmode) { +#ifdef RT_USING_DFS int fd; - +#endif + /* Register standard Input Output devices. */ if (strcmp(name, __stdin_name) == 0) return (STDIN); @@ -91,12 +93,13 @@ int _sys_close(FILEHANDLE fh) */ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode) { +#ifdef RT_USING_DFS int size; - +#endif + if (fh == STDIN) { /* TODO */ - return 0; } @@ -125,8 +128,10 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode) */ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode) { +#ifdef RT_USING_DFS int size; - +#endif + if ((fh == STDOUT) || (fh == STDERR)) { #ifndef RT_USING_CONSOLE |
