source: rtems/c/src/exec/libfs/src/imfs/imfs_mount.c @ b2709481

4.104.114.84.95
Last change on this file since b2709481 was b2709481, checked in by Joel Sherrill <joel.sherrill@…>, on 01/04/02 at 18:30:58

2002-01-04 Ralf Corsepius <corsepiu@…>

  • src/imfs/imfs_eval.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/memfile.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_readlink.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_unlink.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_link.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_chown.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/ioman.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_mount.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_directory.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_stat.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_fchmod.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_symlink.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_mknod.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/linearfile.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs_unmount.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one.
  • src/imfs/imfs.h: Apply rtems_set_errno_and_return_minus_one. Comment out increment_and_check_linkcounts.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  IMFS_mount
3 * 
4 *  This routine will look at a mount table entry that we are going to
5 *  add to the mount table. If the mount point rtems_filesystem
6 *  location_info_t struct refers to a node that is a directory,
7 *  the node will be marked as a mount point by setting its directory.mt_fs
8 *  pointer to point to the mount table entry that we are about to add
9 *  to the mount table chain.
10 *
11 *  COPYRIGHT (c) 1989-1999.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.OARcorp.com/rtems/license.html.
17 *
18 *  $Id$
19 */
20
21#if HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25#include <errno.h>
26
27#include "imfs.h"
28#include <rtems/libio_.h>
29#include <rtems/seterr.h>
30
31int IMFS_mount(
32  rtems_filesystem_mount_table_entry_t *mt_entry
33)
34{
35  IMFS_jnode_t  *node;
36
37  node = mt_entry->mt_point_node.node_access;
38
39  /*
40   *  Is the node that we are mounting onto a directory node ?
41   */
42 
43  if ( node->type != IMFS_DIRECTORY )
44    rtems_set_errno_and_return_minus_one( ENOTDIR );
45
46  /*
47   *  Set mt_fs pointer to point to the mount table entry for
48   *  the mounted file system.
49   */
50
51  node->info.directory.mt_fs = mt_entry;
52  return 0;
53}
Note: See TracBrowser for help on using the repository browser.