Subversion Repositories HelenOS

Rev

Rev 2593 | Rev 2683 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2593 Rev 2624
Line 97... Line 97...
97
 *
97
 *
98
 * @param fd        File descriptor being released.
98
 * @param fd        File descriptor being released.
99
 */
99
 */
100
void vfs_fd_free(int fd)
100
void vfs_fd_free(int fd)
101
{
101
{
-
 
102
    assert(fd < MAX_OPEN_FILES);
102
    assert(files[fd] != NULL);
103
    assert(files[fd] != NULL);
103
    vfs_file_delref(files[fd]);
104
    vfs_file_delref(files[fd]);
104
    files[fd] = NULL;
105
    files[fd] = NULL;
105
}
106
}
106
 
107
 
Line 142... Line 143...
142
 *
143
 *
143
 * @return      VFS file structure corresponding to fd.
144
 * @return      VFS file structure corresponding to fd.
144
 */
145
 */
145
vfs_file_t *vfs_file_get(int fd)
146
vfs_file_t *vfs_file_get(int fd)
146
{
147
{
-
 
148
    if (fd < MAX_OPEN_FILES)
147
    return files[fd];
149
        return files[fd];
-
 
150
    return NULL;
148
}
151
}
149
 
152
 
150
/**
153
/**
151
 * @}
154
 * @}
152
 */
155
 */