RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


IMFS_link()

PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

6.4.1.3: IMFS_link()

Corresponding Structure Element:

link

Arguments:

rtems_filesystem_location_info_t    *to_loc,      /* IN */
rtems_filesystem_location_info_t    *parent_loc,  /* IN */
const char                          *token        /* IN */

File:

imfs_link.c

Description:

This routine is used in the IMFS filesystem to create a hard-link.

It will first examine the st_nlink count of the node that we are trying to. If the link count exceeds LINK_MAX an error will be returned.

The name of the link will be normalized to remove extraneous separators from the end of the name.

IMFS_create_node will be used to create a filesystem node that will have the following characteristics:

If there was trouble allocating memory for the new node an error will be returned.

The st_nlink count of the target node will be incremented to reflect the new link.

The time fields of the link will be set to reflect the creation time of the hard-link.


PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

Copyright © 1988-2004 OAR Corporation