Complete fragmentary support for ferror(). From Macs N

This commit is contained in:
Gregory Nutt
2014-03-31 09:39:10 -06:00
parent 8772a4e104
commit cd135fe3a8
7 changed files with 28 additions and 46 deletions
+3 -6
View File
@@ -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();
}