diff options
author | Andrey Nazarov <skuller@skuller.net> | 2010-09-12 17:45:42 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2010-09-12 17:45:42 +0000 |
commit | 57defac991fa739fdcdb9451a29614feb66a6874 (patch) | |
tree | 7e5cc974c7026f3f475a7a9a6e7cb0eb2361915c /source/files.c | |
parent | 1c11b284a0c26b83574b6fc4a3c0990e93c4f82d (diff) |
Fixed FS_LoadFile to return EMFILE instead of bogus ENOENT when out of handles.
Changed FS_FOpenFile to return EMFILE instead of ENFILE.
Diffstat (limited to 'source/files.c')
-rw-r--r-- | source/files.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |