Changeset f9a4e80 in rtems


Ignore:
Timestamp:
Jun 25, 2010, 2:23:48 PM (9 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.11, master
Children:
69cab20e
Parents:
569b3f4
Message:

2010-06-25 Jennifer Averett <Jennifer.Averett@…

  • libcsupport/include/rtems/libio.h, libfs/Makefile.am: Added default filesystem handlers.
  • libfs/src/defaults/default_chown.c, libfs/src/defaults/default_evalpath.c, libfs/src/defaults/default_fchmod.c, libfs/src/defaults/default_fcntl.c, libfs/src/defaults/default_fdatasync.c, libfs/src/defaults/default_freenode.c, libfs/src/defaults/default_fsmount.c, libfs/src/defaults/default_fstat.c, libfs/src/defaults/default_fsync.c, libfs/src/defaults/default_ftruncate.c, libfs/src/defaults/default_ioctl.c, libfs/src/defaults/default_link.c, libfs/src/defaults/default_lseek.c, libfs/src/defaults/default_mount.c, libfs/src/defaults/default_read.c, libfs/src/defaults/default_readlink.c, libfs/src/defaults/default_rename.c, libfs/src/defaults/default_rmnod.c, libfs/src/defaults/default_statvfs.c, libfs/src/defaults/default_symlink.c, libfs/src/defaults/default_unlink.c, libfs/src/defaults/default_utime.c, libfs/src/defaults/default_write.c: New files.
Location:
cpukit
Files:
23 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r569b3f4 rf9a4e80  
     12010-06-25      Jennifer Averett <Jennifer.Averett@OARcorp.com
     2
     3        * libcsupport/include/rtems/libio.h, libfs/Makefile.am: Added default
     4        filesystem handlers.
     5        * libfs/src/defaults/default_chown.c,
     6        libfs/src/defaults/default_evalpath.c,
     7        libfs/src/defaults/default_fchmod.c,
     8        libfs/src/defaults/default_fcntl.c,
     9        libfs/src/defaults/default_fdatasync.c,
     10        libfs/src/defaults/default_freenode.c,
     11        libfs/src/defaults/default_fsmount.c,
     12        libfs/src/defaults/default_fstat.c,
     13        libfs/src/defaults/default_fsync.c,
     14        libfs/src/defaults/default_ftruncate.c,
     15        libfs/src/defaults/default_ioctl.c,
     16        libfs/src/defaults/default_link.c,
     17        libfs/src/defaults/default_lseek.c,
     18        libfs/src/defaults/default_mount.c,
     19        libfs/src/defaults/default_read.c,
     20        libfs/src/defaults/default_readlink.c,
     21        libfs/src/defaults/default_rename.c,
     22        libfs/src/defaults/default_rmnod.c,
     23        libfs/src/defaults/default_statvfs.c,
     24        libfs/src/defaults/default_symlink.c,
     25        libfs/src/defaults/default_unlink.c,
     26        libfs/src/defaults/default_utime.c,
     27        libfs/src/defaults/default_write.c: New files.
     28
    1292010-06-24      Gedare Bloom <giddyup44@yahoo.com>
    230
  • cpukit/libcsupport/include/rtems/libio.h

    r569b3f4 rf9a4e80  
    5151
    5252/**
    53  * @brief A 64-bit file offset for internal use by RTEMS. Based on the Newlib
     53 * A 64-bit file offset for internal use by RTEMS. Based on the Newlib
    5454 * type.
    5555 */
     
    7878 */
    7979
     80/**
     81 *  This type defines the interface to the open(2) system call
     82 *  support which is provided by a file system implementation.
     83 */
    8084typedef int (*rtems_filesystem_open_t)(
    8185  rtems_libio_t *iop,
     
    8589);
    8690
     91/**
     92 *  This type defines the interface to the close(2) system call
     93 *  support which is provided by a file system implementation.
     94 */
    8795typedef int (*rtems_filesystem_close_t)(
    8896  rtems_libio_t *iop
    8997);
    9098
     99/**
     100 *  This type defines the interface to the read(2) system call
     101 *  support which is provided by a file system implementation.
     102 */
    91103typedef ssize_t (*rtems_filesystem_read_t)(
    92104  rtems_libio_t *iop,
     
    95107);
    96108
     109/**
     110 *  This type defines the interface to the write(2) system call
     111 *  support which is provided by a file system implementation.
     112 */
    97113typedef ssize_t (*rtems_filesystem_write_t)(
    98114  rtems_libio_t *iop,
     
    101117);
    102118
     119/**
     120 *  This type defines the interface to the ioctl(2) system call
     121 *  support which is provided by a file system implementation.
     122 */
    103123typedef int (*rtems_filesystem_ioctl_t)(
    104124  rtems_libio_t *iop,
     
    107127);
    108128
     129/**
     130 *  This type defines the interface to the lseek(2) system call
     131 *  support which is provided by a file system implementation.
     132 */
    109133typedef rtems_off64_t (*rtems_filesystem_lseek_t)(
    110134  rtems_libio_t *iop,
     
    113137);
    114138
     139/**
     140 *  This type defines the interface to the fstat(2) system call
     141 *  support which is provided by a file system implementation.
     142 */
    115143typedef int (*rtems_filesystem_fstat_t)(
    116144  rtems_filesystem_location_info_t *loc,
     
    118146);
    119147
     148/**
     149 *  This type defines the interface to the fchmod(2) system call
     150 *  support which is provided by a file system implementation.
     151 */
    120152typedef int (*rtems_filesystem_fchmod_t)(
    121153  rtems_filesystem_location_info_t *loc,
     
    123155);
    124156
     157/**
     158 *  This type defines the interface to the ftruncate(2) system call
     159 *  support which is provided by a file system implementation.
     160 */
    125161typedef int (*rtems_filesystem_ftruncate_t)(
    126162  rtems_libio_t *iop,
     
    128164);
    129165
     166/**
     167 *  This type defines the interface to the fpathconf(2) system call
     168 *  support which is provided by a file system implementation.
     169 */
    130170typedef int (*rtems_filesystem_fpathconf_t)(
    131171  rtems_libio_t *iop,
     
    133173);
    134174
     175/**
     176 *  This type defines the interface to the fsync(2) system call
     177 *  support which is provided by a file system implementation.
     178 */
    135179typedef int (*rtems_filesystem_fsync_t)(
    136180  rtems_libio_t *iop
    137181);
    138182
     183/**
     184 *  This type defines the interface to the fdatasync(2) system call
     185 *  support which is provided by a file system implementation.
     186 */
    139187typedef int (*rtems_filesystem_fdatasync_t)(
    140188  rtems_libio_t *iop
    141189);
    142190
     191/**
     192 *  This type defines the interface to the fnctl(2) system call
     193 *  support which is provided by a file system implementation.
     194 */
    143195typedef int (*rtems_filesystem_fcntl_t)(
    144196  int            cmd,
     
    157209 */
    158210struct _rtems_filesystem_file_handlers_r {
    159     rtems_filesystem_open_t         open_h;
    160     rtems_filesystem_close_t        close_h;
    161     rtems_filesystem_read_t         read_h;
    162     rtems_filesystem_write_t        write_h;
    163     rtems_filesystem_ioctl_t        ioctl_h;
    164     rtems_filesystem_lseek_t        lseek_h;
    165     rtems_filesystem_fstat_t        fstat_h;
    166     rtems_filesystem_fchmod_t       fchmod_h;
    167     rtems_filesystem_ftruncate_t    ftruncate_h;
    168     rtems_filesystem_fpathconf_t    fpathconf_h;
    169     rtems_filesystem_fsync_t        fsync_h;
    170     rtems_filesystem_fdatasync_t    fdatasync_h;
    171     rtems_filesystem_fcntl_t        fcntl_h;
    172     rtems_filesystem_rmnod_t        rmnod_h;
     211  /**
     212   *  This field points to the file system specific implementation
     213   *  of the support routine for the open(2) system call
     214   *
     215   *  @note This method must have a filesystem specific implementation.
     216   *
     217   *  @note There is no default implementation.
     218   */
     219  rtems_filesystem_open_t         open_h;
     220
     221  /**
     222   *  This field points to the file system specific implementation
     223   *  of the support routine for the close(2) system call
     224   *
     225   *  @note This method is REQUIRED by all file systems.
     226   *
     227   *  @note There is no default implementation.
     228   */
     229  rtems_filesystem_close_t        close_h;
     230
     231  /**
     232   *  This field points to the file system specific implementation
     233   *  of the support routine for the read(2) system call
     234   *
     235   *  @note This method must have a filesystem specific implementation.
     236   *
     237   *  @note The default implementation returns -1 and sets
     238   *  errno to ENOTSUP.
     239   */
     240  rtems_filesystem_read_t         read_h;
     241
     242  /**
     243   *  This field points to the file system specific implementation
     244   *  of the support routine for the write(2) system call
     245   *
     246   *  @note This method may use a default implementation.
     247   *
     248   *  @note The default implementation returns -1 and sets
     249   *  errno to ENOTSUP.
     250   */
     251  rtems_filesystem_write_t        write_h;
     252
     253  /**
     254   *  This field points to the file system specific implementation
     255   *  of the support routine for the ioctl(2) system call
     256   *
     257   *  @note This method may use a default implementation.
     258   *
     259   *  @note The default implementation returns -1 and sets
     260   *  errno to ENOTSUP.
     261   */
     262  rtems_filesystem_ioctl_t        ioctl_h;
     263
     264  /**
     265   *  This field points to the file system specific implementation
     266   *  of the support routine for the lseek(2) system call
     267   *
     268   *  @note This method may use a default implementation.
     269   *
     270   *  @note The default implementation returns -1 and sets
     271   *  errno to ENOTSUP.
     272   */
     273  rtems_filesystem_lseek_t        lseek_h;
     274
     275  /**
     276   *  This field points to the file system specific implementation
     277   *  of the support routine for the fstat(2) system call
     278   *
     279   *  @note This method may use a default implementation.
     280   *
     281   *  @note The default implementation returns -1 and sets
     282   *  errno to ENOTSUP.
     283   */
     284  rtems_filesystem_fstat_t        fstat_h;
     285
     286  /**
     287   *  This field points to the file system specific implementation
     288   *  of the support routine for the fchmod(2) system call
     289   *
     290   *  @note This method may use a default implementation.
     291   *
     292   *  @note The default implementation returns -1 and sets
     293   *  errno to ENOTSUP.
     294   */
     295  rtems_filesystem_fchmod_t       fchmod_h;
     296
     297  /**
     298   *  This field points to the file system specific implementation
     299   *  of the support routine for the ftruncate(2) system call
     300   *
     301   *  @note This method may use a default implementation.
     302   *
     303   *  @note The default implementation returns -1 and sets
     304   *  errno to ENOTSUP.
     305   */
     306  rtems_filesystem_ftruncate_t    ftruncate_h;
     307
     308  /**
     309   *  This field points to the file system specific implementation
     310   *  of the support routine for the fpathconf(2) system call
     311   *
     312   *  @note This method may use a default implementation.
     313   *
     314   *  @note The default implementation returns -1 and sets
     315   *  errno to ENOTSUP.
     316   */
     317  rtems_filesystem_fpathconf_t    fpathconf_h;
     318
     319  /**
     320   *  This field points to the file system specific implementation
     321   *  of the support routine for the fsync(2) system call
     322   *
     323   *  @note This method may use a default implementation.
     324   *
     325   *  @note The default implementation returns -1 and sets
     326   *  errno to ENOTSUP.
     327   */
     328  rtems_filesystem_fsync_t        fsync_h;
     329
     330  /**
     331   *  This field points to the file system specific implementation
     332   *  of the support routine for the fdatasync(2) system call
     333   *
     334   *  @note This method may use a default implementation.
     335   *
     336   *  @note The default implementation returns -1 and sets
     337   *  errno to ENOTSUP.
     338   */
     339  rtems_filesystem_fdatasync_t    fdatasync_h;
     340
     341  /**
     342   *  This field points to the file system specific implementation
     343   *  of the support routine for the fcntl(2) system call
     344   *
     345   *  @note This method may use a default implementation.
     346   *
     347   *  @note The default implementation returns -1 and sets
     348   *  errno to ENOTSUP.
     349   */
     350  rtems_filesystem_fcntl_t        fcntl_h;
     351
     352  /**
     353   *  This field points to the file system specific implementation
     354   *  of the support routine for the rmnod(2) system call
     355   *
     356   *  @note This method may use a default implementation.
     357   *
     358   *  @note The default implementation returns -1 and sets
     359   *  errno to ENOTSUP.
     360   */
     361  rtems_filesystem_rmnod_t        rmnod_h;
    173362};
    174363
    175364/**
     365 *  This method defines the interface to the default read(2)
     366 *  system call support which is provided by a file system
     367 *  implementation.
     368 */
     369size_t rtems_filesystem_default_read(
     370  rtems_libio_t *iop,
     371  void          *buffer,
     372  size_t         count
     373);
     374
     375/**
     376 *  This method defines the interface to the default write(2) system call
     377 *  support which is provided by a file system implementation.
     378 */
     379ssize_t rtems_filesystem_default_write(
     380  rtems_libio_t *iop,
     381  const void    *buffer,
     382  size_t         count
     383);
     384
     385/**
     386 *  This method defines the interface to the default ioctl(2) system call
     387 *  support which is provided by a file system implementation.
     388 */
     389int rtems_filesystem_default_ioctl(
     390  rtems_libio_t *iop,
     391  uint32_t       command,
     392  void          *buffer
     393);
     394
     395/**
     396 *  This method defines the interface to the default lseek(2) system call
     397 *  support which is provided by a file system implementation.
     398 */
     399rtems_off64_t rtems_filesystem_default_lseek(
     400  rtems_libio_t *iop,
     401  rtems_off64_t  length,
     402  int            whence
     403);
     404
     405/**
     406 *  This method defines the interface to the default fstat(2) system call
     407 *  support which is provided by a file system implementation.
     408 */
     409int rtems_filesystem_default_fstat(
     410  rtems_filesystem_location_info_t *loc,
     411  struct stat                      *buf
     412);
     413
     414/**
     415 *  This method defines the interface to the default fchmod(2) system call
     416 *  support which is provided by a file system implementation.
     417 */
     418int rtems_filesystem_default_fchmod(
     419  rtems_filesystem_location_info_t *loc,
     420  mode_t                            mode
     421);
     422
     423/**
     424 *  This method defines the interface to the default ftruncate(2) system call
     425 *  support which is provided by a file system implementation.
     426 */
     427int rtems_filesystem_default_ftruncate(
     428  rtems_libio_t *iop,
     429  rtems_off64_t  length
     430);
     431
     432/**
     433 *  This method defines the interface to the default fpathconf(2) system call
     434 *  support which is provided by a file system implementation.
     435 */
     436int rtems_filesystem_default_fpathconf(
     437  rtems_libio_t *iop,
     438  int name
     439);
     440
     441/**
     442 *  This method defines the interface to the default fsync(2) system call
     443 *  support which is provided by a file system implementation.
     444 */
     445int rtems_filesystem_default_fsync(
     446  rtems_libio_t *iop
     447);
     448
     449/**
     450 *  This method defines the interface to the default fdatasync(2) system call
     451 *  support which is provided by a file system implementation.
     452 */
     453int rtems_filesystem_default_fdatasync(
     454  rtems_libio_t *iop
     455);
     456
     457/**
     458 *  This method defines the interface to the default fnctl(2) system call
     459 *  support which is provided by a file system implementation.
     460 */
     461int rtems_filesystem_default_fcntl(
     462  int            cmd,
     463  rtems_libio_t *iop
     464);
     465
     466/**
     467 *  This method defines the interface to the default rmnod(2) system call
     468 *  support which is provided by a file system implementation.
     469 */
     470int rtems_filesystem_default_rmnod(
     471 rtems_filesystem_location_info_t      *parent_loc,   /* IN */
     472 rtems_filesystem_location_info_t      *pathloc       /* IN */
     473);
     474
     475/**
    176476 * @name File System Operations
    177477 *
     
    179479 */
    180480
    181 /*
    182  *  XXX
    183  *  This routine does not allocate any space and rtems_filesystem_freenode_t
    184  *  is not called by the generic after calling this routine.
    185  *  ie. node_access does not have to contain valid data when the
    186  *      routine returns.
     481/**
     482 *  This type defines the interface to the mknod(2) system call
     483 *  support which is provided by a file system implementation.
     484 * 
     485 *  @note This routine does not allocate any space and
     486 *  rtems_filesystem_freenode_t is not called by the generic
     487 *  after calling this routine. ie. node_access does not have
     488 *  to contain valid data when the routine returns.
    187489 */
    188490typedef int (*rtems_filesystem_mknod_t)(
     
    193495);
    194496
    195 /*
    196  *  rtems_filesystem_freenode_t must be called by the generic after
    197  *  calling this routine
    198  */
    199 
     497/**
     498 *  This type defines the interface that allows the 
     499 *  file system implementation to parse a path and
     500 *  allocate any memory necessary for tracking purposes.
     501 *
     502 *  @note rtems_filesystem_freenode_t must be called by
     503 *  the generic after calling this routine
     504 */
    200505typedef int (*rtems_filesystem_evalpath_t)(
    201506  const char                        *pathname,      /* IN     */
     
    205510);
    206511
     512/**
     513 *  This type defines the interface that allows the 
     514 *  file system implementation to parse a path with the
     515 *  intent of creating a new node and to 
     516 *  allocate any memory necessary for tracking purposes.
     517 *
     518 *  @note rtems_filesystem_freenode_t must be called by
     519 *  the generic after calling this routine
     520 */
    207521typedef int (*rtems_filesystem_evalmake_t)(
    208522   const char                       *path,       /* IN */
     
    211525);
    212526
     527/**
     528 *  This type defines the interface to the link(2) system call
     529 *  support which is provided by a file system implementation.
     530 */ 
    213531typedef int (*rtems_filesystem_link_t)(
    214  rtems_filesystem_location_info_t  *to_loc,      /* IN */
    215  rtems_filesystem_location_info_t  *parent_loc,  /* IN */
    216  const char                        *name         /* IN */
    217 );
    218 
     532  rtems_filesystem_location_info_t  *to_loc,      /* IN */
     533  rtems_filesystem_location_info_t  *parent_loc,  /* IN */
     534  const char                        *name         /* IN */
     535);
     536
     537/**
     538 *  This type defines the interface to the unlink(2) system call
     539 *  support which is provided by a file system implementation.
     540 */
    219541typedef int (*rtems_filesystem_unlink_t)(
    220  rtems_filesystem_location_info_t  *parent_pathloc, /* IN */
    221  rtems_filesystem_location_info_t  *pathloc         /* IN */
    222 );
    223 
     542  rtems_filesystem_location_info_t  *parent_pathloc, /* IN */
     543  rtems_filesystem_location_info_t  *pathloc         /* IN */
     544);
     545
     546/**
     547 *  This type defines the interface to the chown(2) system call
     548 *  support which is provided by a file system implementation.
     549 */
    224550typedef int (*rtems_filesystem_chown_t)(
    225  rtems_filesystem_location_info_t  *pathloc,       /* IN */
    226  uid_t                              owner,         /* IN */
    227  gid_t                              group          /* IN */
    228 );
    229 
     551  rtems_filesystem_location_info_t  *pathloc,       /* IN */
     552  uid_t                              owner,         /* IN */
     553  gid_t                              group          /* IN */
     554);
     555
     556/**
     557 *  This type defines the interface to the freenod(2) system call
     558 *  support which is provided by a file system implementation.
     559 */
    230560typedef int (*rtems_filesystem_freenode_t)(
    231561 rtems_filesystem_location_info_t      *pathloc       /* IN */
    232562);
    233563
     564/**
     565 *  This type defines the interface that allows the implemented
     566 *  filesystem ot mount another filesystem at the given location.
     567 */
    234568typedef int (* rtems_filesystem_mount_t ) (
    235569   rtems_filesystem_mount_table_entry_t *mt_entry     /* IN */
    236570);
    237571
     572/**
     573 *  This type defines the interface that allows a file system
     574 *  implementation to do any necessary work that is needed when
     575 *  it is being mounted.
     576 */ 
    238577typedef int (* rtems_filesystem_fsmount_me_t )(
    239578  rtems_filesystem_mount_table_entry_t *mt_entry,     /* IN */
     
    241580);
    242581
     582/**
     583 *  This type defines the interface allow the filesystem to
     584 *  unmount a filesystem that was mounted at one of its node
     585 *  locations.
     586 */
    243587typedef int (* rtems_filesystem_unmount_t ) (
    244588  rtems_filesystem_mount_table_entry_t *mt_entry     /* IN */
    245589);
    246590
     591/**
     592 *  This type defines the interface that allows a file system
     593 *  implementation to do any necessary work that is needed when
     594 *  it is being unmounted.
     595 */
    247596typedef int (* rtems_filesystem_fsunmount_me_t ) (
    248597   rtems_filesystem_mount_table_entry_t *mt_entry    /* IN */
    249598);
    250599
     600/**
     601 *  This type defines the interface that will return the
     602 *  type of a filesystem implementations node.
     603 */
    251604typedef rtems_filesystem_node_types_t (* rtems_filesystem_node_type_t) (
    252605  rtems_filesystem_location_info_t    *pathloc      /* IN */
    253606);
    254607
     608/**
     609 *  This type defines the interface to the time(2) system call
     610 *  support which is provided by a file system implementation.
     611 */
    255612typedef int (* rtems_filesystem_utime_t)(
    256613  rtems_filesystem_location_info_t  *pathloc,       /* IN */
     
    259616);
    260617
     618/**
     619 *  This type defines the interface to the link(2) system call
     620 *  support which is provided by a file system implementation.
     621 */
    261622typedef int (*rtems_filesystem_evaluate_link_t)(
    262623  rtems_filesystem_location_info_t *pathloc,     /* IN/OUT */
     
    264625);
    265626
     627/**
     628 *  This type defines the interface to the symlink(2) system call
     629 *  support which is provided by a file system implementation.
     630 */
    266631typedef int (*rtems_filesystem_symlink_t)(
    267632 rtems_filesystem_location_info_t  *loc,         /* IN */
     
    270635);
    271636
     637/**
     638 *  This type defines the interface to the readlink(2) system call
     639 *  support which is provided by a file system implementation.
     640 */
    272641typedef int (*rtems_filesystem_readlink_t)(
    273642 rtems_filesystem_location_info_t  *loc,     /* IN  */
     
    276645);
    277646
     647/**
     648 *  This type defines the interface to the name(2) system call
     649 *  support which is provided by a file system implementation.
     650 */
    278651typedef int (*rtems_filesystem_rename_t)(
    279652 rtems_filesystem_location_info_t  *old_parent_loc,  /* IN */
     
    283656);
    284657
     658/**
     659 *  This type defines the interface to the statvfs(2) system call
     660 *  support which is provided by a file system implementation.
     661 */
    285662typedef int (*rtems_filesystem_statvfs_t)(
    286663 rtems_filesystem_location_info_t  *loc,     /* IN  */
     
    294671 */
    295672struct _rtems_filesystem_operations_table {
     673
     674    /**
     675     *  This field points to the file system specific implementation
     676     *  of the support routine that evaluates a character path and
     677     *  returns the node assocated with the last node in the path.
     678     *
     679     *  @note This method must have a filesystem specific implementation.
     680     *
     681     *  @note There is no default implementation.
     682     */
    296683    rtems_filesystem_evalpath_t      evalpath_h;
     684
     685    /**
     686     *  This field points to the file system specific implementation
     687     *  of the support routine that evaluates a character path and
     688     *  returns the node assocated with next to the last node in
     689     *  the path.  The last node will be the new node to be created.
     690     *
     691     *  @note This method must have a filesystem specific implementation.
     692     *
     693     *  @note There is no default implementation.
     694     */
    297695    rtems_filesystem_evalmake_t      evalformake_h;
     696
     697    /**
     698     *  This field points to the file system specific implementation
     699     *  of the support routine for the link(2) system call
     700     *
     701     *  @note This method may use a default implementation.
     702     *
     703     *  @note The default implementation returns -1 and sets
     704     *  errno to ENOTSUP.
     705     */
    298706    rtems_filesystem_link_t          link_h;
     707
     708    /**
     709     *  This field points to the file system specific implementation
     710     *  of the support routine for the unlink(2) system call
     711     *
     712     *  @note This method may use a default implementation.
     713     *
     714     *  @note The default implementation returns -1 and sets
     715     *  errno to ENOTSUP.
     716     */
    299717    rtems_filesystem_unlink_t        unlink_h;
     718
     719    /**
     720     *  This field points to the file system specific implementation
     721     *  of a method that returns the node type of the given node.
     722     *
     723     *  @note This method may use a default implementation.
     724     *
     725     *  @note The default implementation returns -1 and sets
     726     *  errno to ENOTSUP.
     727     */
    300728    rtems_filesystem_node_type_t     node_type_h;
     729
     730    /**
     731     *  This field points to the file system specific implementation
     732     *  of the support routine for the link(2) system call
     733     *
     734     *  @note This method may use a mknod implementation.
     735     *
     736     *  @note The default implementation returns -1 and sets
     737     *  errno to ENOTSUP.
     738     */
    301739    rtems_filesystem_mknod_t         mknod_h;
     740
     741    /**
     742     *  This field points to the file system specific implementation
     743     *  of the support routine for the link(2) system call
     744     *
     745     *  @note This method may use a default implementation.
     746     *
     747     *  @note The default implementation returns -1 and sets
     748     *  errno to ENOTSUP.
     749     */
    302750    rtems_filesystem_chown_t         chown_h;
     751
     752    /**
     753     *  This field points to the file system specific implementation
     754     *  of the support routine for the freenod(2) system call
     755     *
     756     *  @note This method may use a default implementation.
     757     *
     758     *  @note The default implementation returns -1 and sets
     759     *  errno to ENOTSUP.
     760     */
    303761    rtems_filesystem_freenode_t      freenod_h;
     762
     763    /**
     764     *  This field points to the file system specific implementation
     765     *  of the support routine for the mount(2) system call
     766     *
     767     *  @note This method may use a default implementation.
     768     *
     769     *  @note The default implementation returns -1 and sets
     770     *  errno to ENOTSUP.
     771     */
    304772    rtems_filesystem_mount_t         mount_h;
     773
     774    /**
     775     *  This field points to the file system specific implementation
     776     *  of the support routine for the fsmount(2) system call
     777     *
     778     *  @note This method may use a default implementation.
     779     *
     780     *  @note The default implementation returns -1 and sets
     781     *  errno to ENOTSUP.
     782     */
    305783    rtems_filesystem_fsmount_me_t    fsmount_me_h;
     784
     785    /**
     786     *  This field points to the file system specific implementation
     787     *  of the support routine for the unmount(2) system call
     788     *
     789     *  @note This method may use a default implementation.
     790     *
     791     *  @note The default implementation returns -1 and sets
     792     *  errno to ENOTSUP.
     793     */
    306794    rtems_filesystem_unmount_t       unmount_h;
     795
     796    /**
     797     *  This field points to the file system specific implementation
     798     *  of the support routine for the fsunmount(2) system call
     799     *
     800     *  @note This method may use a default implementation.
     801     *
     802     *  @note The default implementation returns -1 and sets
     803     *  errno to ENOTSUP.
     804     */
    307805    rtems_filesystem_fsunmount_me_t  fsunmount_me_h;
     806
     807    /**
     808     *  This field points to the file system specific implementation
     809     *  of the support routine for the utime(2) system call
     810     *
     811     *  @note This method may use a default implementation.
     812     *
     813     *  @note The default implementation returns -1 and sets
     814     *  errno to ENOTSUP.
     815     */
    308816    rtems_filesystem_utime_t         utime_h;
     817
     818    /**
     819     *  This field points to the file system specific implementation
     820     *  of the support routine for the eval_link(2) system call
     821     *
     822     *  @note This method may use a default implementation.
     823     *
     824     *  @note The default implementation returns -1 and sets
     825     *  errno to ENOTSUP.
     826     */
    309827    rtems_filesystem_evaluate_link_t eval_link_h;
     828
     829    /**
     830     *  This field points to the file system specific implementation
     831     *  of the support routine for the sumlink(2) system call
     832     *
     833     *  @note This method may use a default implementation.
     834     *
     835     *  @note The default implementation returns -1 and sets
     836     *  errno to ENOTSUP.
     837     */
    310838    rtems_filesystem_symlink_t       symlink_h;
     839
     840    /**
     841     *  This field points to the file system specific implementation
     842     *  of the support routine for the readlink(2) system call
     843     *
     844     *  @note This method may use a default implementation.
     845     *
     846     *  @note The default implementation returns -1 and sets
     847     *  errno to ENOTSUP.
     848     */
    311849    rtems_filesystem_readlink_t      readlink_h;
     850
     851    /**
     852     *  This field points to the file system specific implementation
     853     *  of the support routine for the rename(2) system call
     854     *
     855     *  @note This method may use a default implementation.
     856     *
     857     *  @note The default implementation returns -1 and sets
     858     *  errno to ENOTSUP.
     859     */
    312860    rtems_filesystem_rename_t        rename_h;
     861
     862    /**
     863     *  This field points to the file system specific implementation
     864     *  of the support routine for the statvfs(2) system call
     865     *
     866     *  @note This method may use a default implementation.
     867     *
     868     *  @note The default implementation returns -1 and sets
     869     *  errno to ENOTSUP.
     870     */
    313871    rtems_filesystem_statvfs_t       statvfs_h;
    314872};
     873
     874/*
     875 * @brief Default filesystem evalpath
     876 */
     877
     878
     879/**
     880 * @brief Provides a defualt routine for filesystem
     881 * implementation of a link command.
     882 */
     883int rtems_filesystem_default_link(
     884 rtems_filesystem_location_info_t  *to_loc,      /* IN */
     885 rtems_filesystem_location_info_t  *parent_loc,  /* IN */
     886 const char                        *name         /* IN */
     887);
     888
     889/**
     890 * @brief Provides a defualt routine for filesystem
     891 * implementation of a unlink command.
     892 */
     893int rtems_filesystem_default_unlink(
     894 rtems_filesystem_location_info_t  *parent_pathloc, /* IN */
     895 rtems_filesystem_location_info_t  *pathloc         /* IN */
     896);
     897
     898/**
     899 * @brief Provides a defualt routine for filesystem
     900 * implementation of a chown command.
     901 */
     902int rtems_filesystem_default_chown(
     903 rtems_filesystem_location_info_t  *pathloc,       /* IN */
     904 uid_t                              owner,         /* IN */
     905 gid_t                              group          /* IN */
     906);
     907
     908/**
     909 * @brief Provides a defualt routine for filesystem
     910 * implementation of a freenode command.
     911 */
     912int rtems_filesystem_default_freenode(
     913 rtems_filesystem_location_info_t      *pathloc       /* IN */
     914);
     915
     916/**
     917 * @brief Provides a defualt routine for filesystem
     918 * implementation of a mount command.
     919 */
     920int rtems_filesystem_default_mount (
     921   rtems_filesystem_mount_table_entry_t *mt_entry     /* IN */
     922);
     923
     924/**
     925 * @brief Provides a defualt routine for filesystem
     926 * implementation of a fsmount command.
     927 */
     928int rtems_filesystem_default_fsmount(
     929  rtems_filesystem_mount_table_entry_t *mt_entry,     /* IN */
     930  const void                           *data          /* IN */
     931);
     932
     933/**
     934 * @brief Provides a defualt routine for filesystem
     935 * implementation of a unmount command.
     936 */
     937int rtems_filesystem_default_unmount(
     938  rtems_filesystem_mount_table_entry_t *mt_entry     /* IN */
     939);
     940
     941/**
     942 * @brief Provides a defualt routine for filesystem
     943 * implementation of a fsunmount command.
     944 */
     945int rtems_filesystem_default_fsunmount(
     946   rtems_filesystem_mount_table_entry_t *mt_entry    /* IN */
     947);
     948
     949
     950/**
     951 * @brief Provides a defualt routine for filesystem
     952 * implementation of a utime command.
     953 */
     954int rtems_filesystem_default_utime(
     955  rtems_filesystem_location_info_t  *pathloc,       /* IN */
     956  time_t                             actime,        /* IN */
     957  time_t                             modtime        /* IN */
     958);
     959
     960/**
     961 * @brief Provides a defualt routine for filesystem
     962 * implementation of a link command.
     963 */
     964int rtems_filesystem_default_evaluate_link(
     965  rtems_filesystem_location_info_t *pathloc,     /* IN/OUT */
     966  int                               flags        /* IN     */
     967);
     968
     969/**
     970 * @brief Provides a defualt routine for filesystem
     971 * implementation of a symlink command.
     972 */
     973int rtems_filesystem_default_symlink(
     974 rtems_filesystem_location_info_t  *loc,         /* IN */
     975 const char                        *link_name,   /* IN */
     976 const char                        *node_name
     977);
     978
     979/**
     980 * @brief Provides a defualt routine for filesystem
     981 * implementation of a readlink command.
     982 */
     983int rtems_filesystem_default_readlink(
     984 rtems_filesystem_location_info_t  *loc,     /* IN  */
     985 char                              *buf,     /* OUT */
     986 size_t                            bufsize
     987);
     988
     989/**
     990 * @brief Provides a defualt routine for filesystem
     991 * implementation of a rename command.
     992 */
     993int rtems_filesystem_default_rename(
     994 rtems_filesystem_location_info_t  *old_parent_loc,  /* IN */
     995 rtems_filesystem_location_info_t  *old_loc,         /* IN */
     996 rtems_filesystem_location_info_t  *new_parent_loc,  /* IN */
     997 const char                        *name             /* IN */
     998);
     999
     1000/**
     1001 * @brief Provides a defualt routine for filesystem
     1002 * implementation of a statvfs command.
     1003 */
     1004int rtems_filesystem_default_statvfs(
     1005 rtems_filesystem_location_info_t  *loc,     /* IN  */
     1006 struct statvfs                    *buf      /* OUT */
     1007);
    3151008
    3161009/**
  • cpukit/libfs/Makefile.am

    r569b3f4 rf9a4e80  
    1515EXTRA_DIST = README
    1616
    17 noinst_LIBRARIES = libimfs.a
     17noinst_LIBRARIES = libdefaultfs.a
     18libdefaultfs_a_SOURCES = \
     19    src/defaults/default_chown.c src/defaults/default_fdatasync.c  \
     20    src/defaults/default_fsync.c src/defaults/default_lseek.c \
     21    src/defaults/default_rename.c src/defaults/default_unlink.c \
     22    src/defaults/default_evalpath.c src/defaults/default_freenode.c \
     23    src/defaults/default_ftruncate.c src/defaults/default_mount.c \
     24    src/defaults/default_rmnod.c src/defaults/default_utime.c \
     25    src/defaults/default_fchmod.c src/defaults/default_fsmount.c \
     26    src/defaults/default_ioctl.c src/defaults/default_read.c \
     27    src/defaults/default_statvfs.c  src/defaults/default_write.c \
     28    src/defaults/default_fcntl.c src/defaults/default_fstat.c \
     29    src/defaults/default_link.c src/defaults/default_readlink.c \
     30    src/defaults/default_symlink.c
    1831
     32noinst_LIBRARIES += libimfs.a
    1933libimfs_a_SOURCES =
    2034
Note: See TracChangeset for help on using the changeset viewer.