source: rtems/cpukit/libfs/src/dosfs/msdos_handlers_file.c @ 30d4124

4.115
Last change on this file since 30d4124 was 30d4124, checked in by Sebastian Huber <sebastian.huber@…>, on 05/07/12 at 14:30:37

Filesystem: PR1398: Fix lseek() mechanic

According to POSIX the lseek() function shall not, by itself, extend the
size of a file.

Remove the size field of rtems_libio_t. A file has only one size but
may have multiple open file descriptors. Thus a file size field in the
file descriptor may lead to inconsistencies.

New default handlers rtems_filesystem_default_lseek_file() and
rtems_filesystem_default_lseek_directory().

  • Property mode set to 100644
File size: 795 bytes
Line 
1/*
2 *  File Operations Table for MSDOS filesystem
3 *
4 *  Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
5 *  Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  @(#) $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems/libio.h>
19#include "msdos.h"
20
21const rtems_filesystem_file_handlers_r msdos_file_handlers = {
22    msdos_file_open,
23    msdos_file_close,
24    msdos_file_read,
25    msdos_file_write,
26    rtems_filesystem_default_ioctl,
27    rtems_filesystem_default_lseek_file,
28    msdos_file_stat,
29    msdos_file_ftruncate,
30    msdos_file_sync,
31    msdos_file_datasync,
32    rtems_filesystem_default_fcntl
33};
Note: See TracBrowser for help on using the repository browser.