diff options
Diffstat (limited to 'nuttx/fs/fs_closedir.c')
-rw-r--r-- | nuttx/fs/fs_closedir.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/nuttx/fs/fs_closedir.c b/nuttx/fs/fs_closedir.c index 572be4053..fe0994478 100644 --- a/nuttx/fs/fs_closedir.c +++ b/nuttx/fs/fs_closedir.c @@ -2,7 +2,7 @@ * fs/fs_closedir.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -57,20 +57,19 @@ ****************************************************************************/ /**************************************************************************** - * Name: seekdir + * Name: closedir * * Description: - * The closedir() function closes the directory stream - * associated with 'dirp'. The directory stream - * descriptor 'dirp' is not available after this call. + * The closedir() function closes the directory stream associated with + * 'dirp'. The directory stream descriptor 'dirp' is not available after + * this call. * * Inputs: - * dirp -- An instance of type DIR created by a previous - * call to opendir(); + * dirp -- An instance of type DIR created by a previous call to opendir(); * * Return: - * The closedir() function returns 0 on success. On error, - * -1 is returned, and errno is set appropriately. + * The closedir() function returns 0 on success. On error, -1 is + * returned, and errno is set appropriately. * ****************************************************************************/ @@ -104,8 +103,8 @@ int closedir(FAR DIR *dirp) */ if (inode->u.i_mops && inode->u.i_mops->closedir) - { - /* Perform the closedir() operation */ + { + /* Perform the closedir() operation */ ret = inode->u.i_mops->closedir(inode, idir); if (ret < 0) @@ -144,7 +143,6 @@ errout_with_inode: #endif errout: - errno = ret; + set_errno(ret); return ERROR; } - |