mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
Complete fragmentary support for ferror(). From Macs N
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* libc/stdio/lib_libfflush.c
|
||||
*
|
||||
* Copyright (C) 2007-2008, 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2008, 2011-2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -33,10 +33,6 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Compilation Switches
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
@@ -54,7 +50,7 @@
|
||||
#include "lib_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -157,6 +153,7 @@ ssize_t lib_fflush(FAR FILE *stream, bool bforce)
|
||||
* returned the negated errno value.
|
||||
*/
|
||||
|
||||
stream->fs_flags |= __FS_FLAG_ERROR;
|
||||
lib_give_semaphore(stream);
|
||||
return -get_errno();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user