From 57defac991fa739fdcdb9451a29614feb66a6874 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Sun, 12 Sep 2010 17:45:42 +0000 Subject: Fixed FS_LoadFile to return EMFILE instead of bogus ENOENT when out of handles. Changed FS_FOpenFile to return EMFILE instead of ENFILE. --- source/files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/files.c') diff --git a/source/files.c b/source/files.c index ab8674a..36aeda1 100644 --- a/source/files.c +++ b/source/files.c @@ -1289,7 +1289,7 @@ ssize_t FS_FOpenFile( const char *name, qhandle_t *f, unsigned mode ) { // allocate new file handle file = alloc_handle( &handle ); if( !file ) { - return Q_ERR_NFILE; + return Q_ERR_MFILE; } file->mode = mode; @@ -1392,7 +1392,7 @@ ssize_t FS_LoadFileEx( const char *path, void **buffer, unsigned flags ) { // allocate new file handle file = alloc_handle( &f ); if( !file ) { - return Q_ERR_NOENT; + return Q_ERR_MFILE; } file->mode = ( flags & ~FS_MODE_MASK ) | FS_MODE_READ; -- cgit v1.2.3