source: rtems/cpukit/libfs/src/rfs/rtems-rfs-link.h @ a9fa9b7

4.104.115
Last change on this file since a9fa9b7 was a9fa9b7, checked in by Chris Johns <chrisj@…>, on 02/18/10 at 00:24:25

2010-02-18 Chris Johns <chrisj@…>

  • libfs/src/rfs/rtems-rfs-bitmaps.c, libfs/src/rfs/rtems-rfs-bitmaps.h, libfs/src/rfs/rtems-rfs-bitmaps-ut.c, libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-block.h, libfs/src/rfs/rtems-rfs-block-pos.h, libfs/src/rfs/rtems-rfs-buffer-bdbuf.c, libfs/src/rfs/rtems-rfs-buffer.c, libfs/src/rfs/rtems-rfs-buffer-devio.c, libfs/src/rfs/rtems-rfs-buffer.h, libfs/src/rfs/rtems-rfs-data.h, libfs/src/rfs/rtems-rfs-dir.c, libfs/src/rfs/rtems-rfs-dir.h, libfs/src/rfs/rtems-rfs-dir-hash.c, libfs/src/rfs/rtems-rfs-dir-hash.h, libfs/src/rfs/rtems-rfs-file.c, libfs/src/rfs/rtems-rfs-file.h, libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system-fwd.h, libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-format.h, libfs/src/rfs/rtems-rfs-group.c, libfs/src/rfs/rtems-rfs-group.h, libfs/src/rfs/rtems-rfs.h, libfs/src/rfs/rtems-rfs-inode.c, libfs/src/rfs/rtems-rfs-inode.h, libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-link.h, libfs/src/rfs/rtems-rfs-mutex.c, libfs/src/rfs/rtems-rfs-mutex.h, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs-rtems-dev.c, libfs/src/rfs/rtems-rfs-rtems-dir.c, libfs/src/rfs/rtems-rfs-rtems-file.c, libfs/src/rfs/rtems-rfs-rtems.h, libfs/src/rfs/rtems-rfs-rtems-utils.c, libfs/src/rfs/rtems-rfs-shell.c, libfs/src/rfs/rtems-rfs-shell.h, libfs/src/rfs/rtems-rfs-trace.c, libfs/src/rfs/rtems-rfs-trace.h: New.
  • Makefile.am, preinstall.am, libfs/Makefile.am, wrapup/Makefile.am: Updated with the RFS support.
  • libfs/README: Updated after 10 years.
  • libblock/src/flashdisk.c, libblock/src/nvdisk.c, libblock/src/ramdisk-driver.c: Updated to the new error reporting in libblock.
  • libmisc/shell/main_ls.c, libmisc/shell/print-ls.c: Fix printing the size in long mode.
  • libnetworking/nfs/bootp_subr.c, libnetworking/rtems/rtems_bootp.c, libnetworking/rtems/rtems_bsdnet_internal.h: Return the BOOTP/DHCP to the forever behaviour of 4.9 with the ability to call BOOTP and control the process if required.
  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*
2 *  COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
3 *
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *  http://www.rtems.com/license/LICENSE.
7 *
8 *  $Id$
9 */
10/**
11 * @file
12 *
13 * @ingroup rtems-rfs
14 *
15 * RTEMS File System Link Support
16 *
17 * This file provides the link support functions.
18 */
19
20#if !defined (_RTEMS_RFS_LINK_H_)
21#define _RTEMS_RFS_LINK_H_
22
23#include <dirent.h>
24
25#include <rtems/rfs/rtems-rfs-file-system.h>
26#include <rtems/rfs/rtems-rfs-inode.h>
27
28/**
29 * Create a link.
30 *
31 * @param fs The file system.
32 * @param name The name of the link.
33 * @param length The length of the name.
34 * @param parent The inode number of the parent directory.
35 * @param target The inode of the target.
36 * @return int The error number (errno). No error if 0.
37 */
38int rtems_rfs_link (rtems_rfs_file_system* fs,
39                    const char*            name,
40                    int                    length,
41                    rtems_rfs_ino          parent,
42                    rtems_rfs_ino          target);
43
44/**
45 * Unlink the node from the parent directory. A directory offset for the target
46 * entry is required because links cause a number of inode numbers to appear in
47 * a single directory so scanning does not work.
48 *
49 * @param fs The file system.
50 * @param parent The inode number of the parent directory.
51 * @param target The inode of the target.
52 * @param doff Parent directory entry offset for the target entry.
53 * @param dir If true unlinking of directory nodes is allowed.
54 * @return int The error number (errno). No error if 0.
55 */
56int rtems_rfs_unlink (rtems_rfs_file_system* fs,
57                      rtems_rfs_ino          parent,
58                      rtems_rfs_ino          target,
59                      uint32_t               doff,
60                      bool                   dir);
61
62/**
63 * Symbolic link is an inode that has a path attached.
64 *
65 * @param fs The file system data.
66 * @param name The name of the node.
67 * @param length The length of the name of the node.
68 * @param link The link path attached to the symlink inode.
69 * @param link_length The length of the link path.
70 * @param parent The parent inode number.
71 * @return int The error number (errno). No error if 0.
72 */
73int rtems_rfs_symlink (rtems_rfs_file_system* fs,
74                       const char*            name,
75                       int                    length,
76                       const char*            link,
77                       int                    link_length,
78                       uid_t                  uid,
79                       gid_t                  gid,
80                       rtems_rfs_ino          parent);
81
82/**
83 * Read a symbolic link into the provided buffer returning the link of link
84 * name.
85 *
86 * @param fs The file system data.
87 * @param link The link inode number to read.
88 * @param path The buffer to write the link path into.
89 * @param size The size of the buffer.
90 * @param length Set to the length of the link path.
91 * @return int The error number (errno). No error if 0.
92 */
93int rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
94                            rtems_rfs_ino          link,
95                            char*                  path,
96                            size_t                 size,
97                            size_t*                length);
98
99#endif
Note: See TracBrowser for help on using the repository browser.