<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Writing a New Filesystem</TITLE
|
>Writing a New Filesystem</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="File System Support Infrastructure"
|
TITLE="File System Support Infrastructure"
|
HREF="fileio.html"><LINK
|
HREF="fileio.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="Devices"
|
TITLE="Devices"
|
HREF="fileio-devices.html"><LINK
|
HREF="fileio-devices.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="PCI Library"
|
TITLE="PCI Library"
|
HREF="io-pci.html"></HEAD
|
HREF="io-pci.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="CHAPTER"
|
CLASS="CHAPTER"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="fileio-devices.html"
|
HREF="fileio-devices.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="io-pci.html"
|
HREF="io-pci.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="CHAPTER"
|
CLASS="CHAPTER"
|
><H1
|
><H1
|
><A
|
><A
|
NAME="FILEIO-WRITING">Chapter 29. Writing a New Filesystem</H1
|
NAME="FILEIO-WRITING">Chapter 29. Writing a New Filesystem</H1
|
><P
|
><P
|
>To create a new filesystem it is necessary to define the fstab entry
|
>To create a new filesystem it is necessary to define the fstab entry
|
and the file IO operations. The easiest way to do this is to copy an
|
and the file IO operations. The easiest way to do this is to copy an
|
existing filesystem: either the test filesystem in the FILEIO package,
|
existing filesystem: either the test filesystem in the FILEIO package,
|
or the RAM or ROM filesystem packages.</P
|
or the RAM or ROM filesystem packages.</P
|
><P
|
><P
|
>To make this clearer, the following is a brief tour of the FILEIO
|
>To make this clearer, the following is a brief tour of the FILEIO
|
relevant parts of the RAM filesystem.</P
|
relevant parts of the RAM filesystem.</P
|
><P
|
><P
|
>First, it is necessary to provide forward definitions of the functions
|
>First, it is necessary to provide forward definitions of the functions
|
that constitute the filesystem interface:</P
|
that constitute the filesystem interface:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>//==========================================================================
|
>//==========================================================================
|
// Forward definitions
|
// Forward definitions
|
|
|
// Filesystem operations
|
// Filesystem operations
|
static int ramfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
|
static int ramfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
|
static int ramfs_umount ( cyg_mtab_entry *mte );
|
static int ramfs_umount ( cyg_mtab_entry *mte );
|
static int ramfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
static int ramfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
int mode, cyg_file *fte );
|
int mode, cyg_file *fte );
|
static int ramfs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
|
static int ramfs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
|
static int ramfs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
|
static int ramfs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
|
static int ramfs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
|
static int ramfs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
|
static int ramfs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
|
static int ramfs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
|
cyg_dir dir2, const char *name2 );
|
cyg_dir dir2, const char *name2 );
|
static int ramfs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
|
static int ramfs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
|
cyg_dir dir2, const char *name2, int type );
|
cyg_dir dir2, const char *name2, int type );
|
static int ramfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
static int ramfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
cyg_file *fte );
|
cyg_file *fte );
|
static int ramfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
static int ramfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
cyg_dir *dir_out );
|
cyg_dir *dir_out );
|
static int ramfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
static int ramfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
struct stat *buf);
|
struct stat *buf);
|
static int ramfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
static int ramfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
int key, void *buf, int len );
|
int key, void *buf, int len );
|
static int ramfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
static int ramfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
|
int key, void *buf, int len );
|
int key, void *buf, int len );
|
|
|
// File operations
|
// File operations
|
static int ramfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
|
static int ramfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
|
static int ramfs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
|
static int ramfs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
|
static int ramfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
|
static int ramfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
|
static int ramfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
|
static int ramfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
|
CYG_ADDRWORD data);
|
CYG_ADDRWORD data);
|
static int ramfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
|
static int ramfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
|
static int ramfs_fo_close (struct CYG_FILE_TAG *fp);
|
static int ramfs_fo_close (struct CYG_FILE_TAG *fp);
|
static int ramfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
|
static int ramfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
|
static int ramfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
|
static int ramfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
|
static int ramfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
|
static int ramfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
|
|
|
// Directory operations
|
// Directory operations
|
static int ramfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
|
static int ramfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
|
static int ramfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );</PRE
|
static int ramfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>We define all of the fstab entries and all of the file IO
|
>We define all of the fstab entries and all of the file IO
|
operations. We also define alternatives for the
|
operations. We also define alternatives for the
|
<TT
|
<TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>fo_read</I
|
>fo_read</I
|
></TT
|
></TT
|
> and
|
> and
|
<TT
|
<TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>fo_lseek</I
|
>fo_lseek</I
|
></TT
|
></TT
|
> file IO operations.</P
|
> file IO operations.</P
|
><P
|
><P
|
>We can now define the filesystem table entry. There is a macro,
|
>We can now define the filesystem table entry. There is a macro,
|
<TT
|
<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>FSTAB_ENTRY</TT
|
>FSTAB_ENTRY</TT
|
> to do this:</P
|
> to do this:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>//==========================================================================
|
>//==========================================================================
|
// Filesystem table entries
|
// Filesystem table entries
|
|
|
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
// Fstab entry.
|
// Fstab entry.
|
// This defines the entry in the filesystem table.
|
// This defines the entry in the filesystem table.
|
// For simplicity we use _FILESYSTEM synchronization for all accesses since
|
// For simplicity we use _FILESYSTEM synchronization for all accesses since
|
// we should never block in any filesystem operations.
|
// we should never block in any filesystem operations.
|
|
|
FSTAB_ENTRY( ramfs_fste, "ramfs", 0,
|
FSTAB_ENTRY( ramfs_fste, "ramfs", 0,
|
CYG_SYNCMODE_FILE_FILESYSTEM|CYG_SYNCMODE_IO_FILESYSTEM,
|
CYG_SYNCMODE_FILE_FILESYSTEM|CYG_SYNCMODE_IO_FILESYSTEM,
|
ramfs_mount,
|
ramfs_mount,
|
ramfs_umount,
|
ramfs_umount,
|
ramfs_open,
|
ramfs_open,
|
ramfs_unlink,
|
ramfs_unlink,
|
ramfs_mkdir,
|
ramfs_mkdir,
|
ramfs_rmdir,
|
ramfs_rmdir,
|
ramfs_rename,
|
ramfs_rename,
|
ramfs_link,
|
ramfs_link,
|
ramfs_opendir,
|
ramfs_opendir,
|
ramfs_chdir,
|
ramfs_chdir,
|
ramfs_stat,
|
ramfs_stat,
|
ramfs_getinfo,
|
ramfs_getinfo,
|
ramfs_setinfo);</PRE
|
ramfs_setinfo);</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>The first argument to this macro gives the fstab entry a name, the
|
>The first argument to this macro gives the fstab entry a name, the
|
remainder are initializers for the field of the structure.</P
|
remainder are initializers for the field of the structure.</P
|
><P
|
><P
|
>We must also define the file operations table that is installed in all
|
>We must also define the file operations table that is installed in all
|
open file table entries:</P
|
open file table entries:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>// -------------------------------------------------------------------------
|
>// -------------------------------------------------------------------------
|
// File operations.
|
// File operations.
|
// This set of file operations are used for normal open files.
|
// This set of file operations are used for normal open files.
|
|
|
static cyg_fileops ramfs_fileops =
|
static cyg_fileops ramfs_fileops =
|
{
|
{
|
ramfs_fo_read,
|
ramfs_fo_read,
|
ramfs_fo_write,
|
ramfs_fo_write,
|
ramfs_fo_lseek,
|
ramfs_fo_lseek,
|
ramfs_fo_ioctl,
|
ramfs_fo_ioctl,
|
cyg_fileio_seltrue,
|
cyg_fileio_seltrue,
|
ramfs_fo_fsync,
|
ramfs_fo_fsync,
|
ramfs_fo_close,
|
ramfs_fo_close,
|
ramfs_fo_fstat,
|
ramfs_fo_fstat,
|
ramfs_fo_getinfo,
|
ramfs_fo_getinfo,
|
ramfs_fo_setinfo
|
ramfs_fo_setinfo
|
};</PRE
|
};</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>These all point to functions supplied by the filesystem except the
|
>These all point to functions supplied by the filesystem except the
|
<TT
|
<TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>fo_select</I
|
>fo_select</I
|
></TT
|
></TT
|
> field which is filled with a
|
> field which is filled with a
|
pointer to <TT
|
pointer to <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_fileio_seltrue()</TT
|
>cyg_fileio_seltrue()</TT
|
>. This is provided
|
>. This is provided
|
by the FILEIO package and is a select function that always returns
|
by the FILEIO package and is a select function that always returns
|
true to all operations.</P
|
true to all operations.</P
|
><P
|
><P
|
>Finally, we need to define a set of file operations for use when
|
>Finally, we need to define a set of file operations for use when
|
reading directories. This table only defines the
|
reading directories. This table only defines the
|
<TT
|
<TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>fo_read</I
|
>fo_read</I
|
></TT
|
></TT
|
> and
|
> and
|
<TT
|
<TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>fo_lseek</I
|
>fo_lseek</I
|
></TT
|
></TT
|
> operations. The rest are filled
|
> operations. The rest are filled
|
with stub functions supplied by the FILEIO package that just return an
|
with stub functions supplied by the FILEIO package that just return an
|
error code.</P
|
error code.</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>// -------------------------------------------------------------------------
|
>// -------------------------------------------------------------------------
|
// Directory file operations.
|
// Directory file operations.
|
// This set of operations are used for open directories. Most entries
|
// This set of operations are used for open directories. Most entries
|
// point to error-returning stub functions. Only the read, lseek and
|
// point to error-returning stub functions. Only the read, lseek and
|
// close entries are functional.
|
// close entries are functional.
|
|
|
static cyg_fileops ramfs_dirops =
|
static cyg_fileops ramfs_dirops =
|
{
|
{
|
ramfs_fo_dirread,
|
ramfs_fo_dirread,
|
(cyg_fileop_write *)cyg_fileio_enosys,
|
(cyg_fileop_write *)cyg_fileio_enosys,
|
ramfs_fo_dirlseek,
|
ramfs_fo_dirlseek,
|
(cyg_fileop_ioctl *)cyg_fileio_enosys,
|
(cyg_fileop_ioctl *)cyg_fileio_enosys,
|
cyg_fileio_seltrue,
|
cyg_fileio_seltrue,
|
(cyg_fileop_fsync *)cyg_fileio_enosys,
|
(cyg_fileop_fsync *)cyg_fileio_enosys,
|
ramfs_fo_close,
|
ramfs_fo_close,
|
(cyg_fileop_fstat *)cyg_fileio_enosys,
|
(cyg_fileop_fstat *)cyg_fileio_enosys,
|
(cyg_fileop_getinfo *)cyg_fileio_enosys,
|
(cyg_fileop_getinfo *)cyg_fileio_enosys,
|
(cyg_fileop_setinfo *)cyg_fileio_enosys
|
(cyg_fileop_setinfo *)cyg_fileio_enosys
|
};</PRE
|
};</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>If the filesystem wants to have an instance automatically mounted on
|
>If the filesystem wants to have an instance automatically mounted on
|
system startup, it must also define a mount table entry. This is done
|
system startup, it must also define a mount table entry. This is done
|
with the <TT
|
with the <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>MTAB_ENTRY</TT
|
>MTAB_ENTRY</TT
|
> macro. This is an example from
|
> macro. This is an example from
|
the test filesystem of how this is used:</P
|
the test filesystem of how this is used:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>MTAB_ENTRY( testfs_mte1,
|
>MTAB_ENTRY( testfs_mte1,
|
"/",
|
"/",
|
"testfs",
|
"testfs",
|
"",
|
"",
|
0);</PRE
|
0);</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>The first argument provides a name for the table entry. The following
|
>The first argument provides a name for the table entry. The following
|
arguments provide initialization for the
|
arguments provide initialization for the
|
<TT
|
<TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>name</I
|
>name</I
|
></TT
|
></TT
|
>, <TT
|
>, <TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>fsname</I
|
>fsname</I
|
></TT
|
></TT
|
>,
|
>,
|
<TT
|
<TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>devname</I
|
>devname</I
|
></TT
|
></TT
|
> and <TT
|
> and <TT
|
CLASS="STRUCTFIELD"
|
CLASS="STRUCTFIELD"
|
><I
|
><I
|
>data</I
|
>data</I
|
></TT
|
></TT
|
>
|
>
|
fields respectively.</P
|
fields respectively.</P
|
><P
|
><P
|
>These definitions are adequate to let the new filesystem interact
|
>These definitions are adequate to let the new filesystem interact
|
with the FILEIO package. The new filesystem now needs to be fleshed
|
with the FILEIO package. The new filesystem now needs to be fleshed
|
out with implementations of the functions defined above. Obviously,
|
out with implementations of the functions defined above. Obviously,
|
the exact form this takes will depend on what the filesystem is
|
the exact form this takes will depend on what the filesystem is
|
intended to do. Take a look at the RAM and ROM filesystems for
|
intended to do. Take a look at the RAM and ROM filesystems for
|
examples of how this has been done.</P
|
examples of how this has been done.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="fileio-devices.html"
|
HREF="fileio-devices.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="io-pci.html"
|
HREF="io-pci.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>Devices</TD
|
>Devices</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="fileio.html"
|
HREF="fileio.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>PCI Library</TD
|
>PCI Library</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|