source: rtems/cpukit/libfs/src/imfs/imfs_readlink.c @ 3c96bee

4.115
Last change on this file since 3c96bee was ef5e452, checked in by Alex Ivanov <alexivanov97@…>, on 12/20/12 at 15:45:31

libfs: Doxygen Enhancement Task #1

  • Property mode set to 100644
File size: 778 bytes
Line 
1/**
2 * @file
3 *
4 * @brief IMFS Put Symbolic Link into Buffer
5 * @ingroup IMFS
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-1999.
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 "imfs.h"
22
23ssize_t IMFS_readlink(
24  const rtems_filesystem_location_info_t *loc,
25  char *buf,
26  size_t bufsize
27)
28{
29  IMFS_jnode_t      *node;
30  ssize_t            i;
31
32  node = loc->node_access;
33
34  IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK );
35
36  for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
37    buf[i] = node->info.sym_link.name[i];
38
39  return i;
40}
Note: See TracBrowser for help on using the repository browser.