source: rtems/cpukit/libfs/src/defaults/default_ftruncate.c @ 816a9cad

4.115
Last change on this file since 816a9cad was 3c2bb22, checked in by Sebastian Huber <sebastian.huber@…>, on 10/11/13 at 14:22:00

Return EINVAL in default ftruncate() handler

According to POSIX this case is implementation defined. Linux and
FreeBSD return EINVAL.

  • Property mode set to 100644
File size: 632 bytes
Line 
1/**
2 * @file
3 *
4 * @brief RTEMS Default File System Truncates a file to indicated length
5 * @ingroup LibIOFSOps File System Operations 
6 */
7
8/*
9 *  COPYRIGHT (c) 2010.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18  #include "config.h"
19#endif
20
21#include <rtems/libio_.h>
22#include <rtems/seterr.h>
23
24int rtems_filesystem_default_ftruncate(
25  rtems_libio_t *iop,
26  off_t          length
27)
28{
29  rtems_set_errno_and_return_minus_one( EINVAL );
30}
Note: See TracBrowser for help on using the repository browser.