Merge pull request #2136 from RT-Thread/fix_printf
[libc] Fix the printf issue when disable DFS
This commit is contained in:
commit
94dfbf6231
@ -9,6 +9,8 @@
|
|||||||
#include <reent.h>
|
#include <reent.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
#ifdef RT_USING_DFS
|
||||||
@ -218,7 +220,7 @@ _ssize_t
|
|||||||
_write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes)
|
_write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes)
|
||||||
{
|
{
|
||||||
#ifndef RT_USING_DFS
|
#ifndef RT_USING_DFS
|
||||||
if (fd == 0)
|
if (fileno(stdout) == fd)
|
||||||
{
|
{
|
||||||
rt_device_t console;
|
rt_device_t console;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user