source: rtems/c/src/libfs/src/imfs/imfs_mount.c @ c058578

4.104.114.84.95
Last change on this file since c058578 was c058578, checked in by Joel Sherrill <joel.sherrill@…>, on 11/01/00 at 21:02:46

2000-11-01 Joel Sherrill <joel@…>

  • src/imfs/Makefile.am, src/imfs/deviceio.c, src/imfs/imfs_chown.c, src/imfs/imfs_config.c, src/imfs/imfs_creat.c, src/imfs/imfs_debug.c, src/imfs/imfs_directory.c, src/imfs/imfs_eval.c, src/imfs/imfs_fchmod.c, src/imfs/imfs_free.c, src/imfs/imfs_fsunmount.c, src/imfs/imfs_gtkn.c, src/imfs/imfs_init.c, src/imfs/imfs_initsupp.c, src/imfs/imfs_link.c, src/imfs/imfs_mknod.c, src/imfs/imfs_mount.c, src/imfs/imfs_readlink.c, src/imfs/imfs_rmnod.c, src/imfs/imfs_stat.c, src/imfs/imfs_symlink.c, src/imfs/imfs_unixstub.c, src/imfs/imfs_unlink.c, src/imfs/imfs_unmount.c, src/imfs/imfs_utime.c, src/imfs/ioman.c, src/imfs/memfile.c, src/imfs/miniimfs_init.c: assoc.h, error.h, libio_.h, libio.h, and libcsupport.h moved from libc to lib/include/rtems and now must be referenced as <rtems/XXX.h>. Now we do not have to reach up and over to libc to pick them up.
  • 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#include <errno.h>
22
23#include "imfs.h"
24#include <rtems/libio_.h>
25
26int IMFS_mount(
27  rtems_filesystem_mount_table_entry_t *mt_entry
28)
29{
30  IMFS_jnode_t  *node;
31
32  node = mt_entry->mt_point_node.node_access;
33
34  /*
35   *  Is the node that we are mounting onto a directory node ?
36   */
37 
38  if ( node->type != IMFS_DIRECTORY )
39    set_errno_and_return_minus_one( ENOTDIR );
40
41  /*
42   *  Set mt_fs pointer to point to the mount table entry for
43   *  the mounted file system.
44   */
45
46  node->info.directory.mt_fs = mt_entry;
47  return 0;
48}
Note: See TracBrowser for help on using the repository browser.