source: rtems/cpukit/libfs/src/defaults/default_ftruncate.c @ 3c2bb22

4.11
Last change on this file since 3c2bb22 was 3c2bb22, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 11, 2013 at 2:22:00 PM

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
RevLine 
[8587b01]1/**
2 * @file
3 *
4 * @brief RTEMS Default File System Truncates a file to indicated length
5 * @ingroup LibIOFSOps File System Operations 
6 */
7
[f9a4e80]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
[3b7c123]17#if HAVE_CONFIG_H
18  #include "config.h"
19#endif
20
[f9a4e80]21#include <rtems/libio_.h>
[76950a6]22#include <rtems/seterr.h>
[f9a4e80]23
24int rtems_filesystem_default_ftruncate(
25  rtems_libio_t *iop,
[e4c0a04b]26  off_t          length
[f9a4e80]27)
28{
[3c2bb22]29  rtems_set_errno_and_return_minus_one( EINVAL );
[f9a4e80]30}
Note: See TracBrowser for help on using the repository browser.