io_fip: return -ENFILE when a file is already open
The cause of failure is not memory shortage. The comment for ENFILE in include/lib/libc/errno.h /* Too many open files in system */ ... is a better match to the warning message here. Change-Id: I45a1740995d464edd8b3e32b93f1f92ba17e5874 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
99c447f440
commit
6eb75a1a2f
|
@ -302,7 +302,7 @@ static int fip_file_open(io_dev_info_t *dev_info, const uintptr_t spec,
|
|||
*/
|
||||
if (current_file.entry.offset_address != 0) {
|
||||
WARN("fip_file_open : Only one open file at a time.\n");
|
||||
return -ENOMEM;
|
||||
return -ENFILE;
|
||||
}
|
||||
|
||||
/* Attempt to access the FIP image */
|
||||
|
|
Loading…
Reference in New Issue