forked from Imagelibrary/rtems
2000-08-25 Joel Sherrill <joel.sherrill@OARcorp.com>
* libc/isatty.c, libc/imfs_handlers_directory.c, libc/creat.c, libc/imfs_directory.c: Fixed style issues.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
/* creat() "system call" */
|
/* creat() "system call" */
|
||||||
|
|
||||||
/* This is needed by f2c and therefore the SPEC benchmarks. */
|
/* This is needed by f2c and therefore the SPEC benchmarks. */
|
||||||
|
|||||||
@@ -1,17 +1,27 @@
|
|||||||
/* isatty.c */
|
/*
|
||||||
|
* COPYRIGHT (c) 1989-1999.
|
||||||
/* Dumb implementation so programs will at least run. */
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int isatty(
|
||||||
isatty (int fd)
|
int fd
|
||||||
|
)
|
||||||
{
|
{
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
|
|
||||||
if (fstat (fd, &buf) < 0)
|
if (fstat (fd, &buf) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (S_ISCHR (buf.st_mode))
|
if (S_ISCHR (buf.st_mode))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* XXX
|
* IMFS Directory Access Routines
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-1999.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
@@ -25,7 +25,9 @@
|
|||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_open
|
||||||
|
*
|
||||||
* This rountine will verify that the node being opened as a directory is
|
* This rountine will verify that the node being opened as a directory is
|
||||||
* in fact a directory node. If it is then the offset into the directory
|
* in fact a directory node. If it is then the offset into the directory
|
||||||
* will be set to 0 to position to the first directory entry.
|
* will be set to 0 to position to the first directory entry.
|
||||||
@@ -50,9 +52,9 @@ int imfs_dir_open(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* imfs_dir_read
|
||||||
/* -----------------------------------------------------------------------
|
*
|
||||||
* This routine will read the next directory entry based on the directory
|
* This routine will read the next directory entry based on the directory
|
||||||
* offset. The offset should be equal to -n- time the size of an individual
|
* offset. The offset should be equal to -n- time the size of an individual
|
||||||
* dirent structure. If n is not an integer multiple of the sizeof a
|
* dirent structure. If n is not an integer multiple of the sizeof a
|
||||||
@@ -138,7 +140,9 @@ int imfs_dir_read(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_close
|
||||||
|
*
|
||||||
* This routine will be called by the generic close routine to cleanup any
|
* This routine will be called by the generic close routine to cleanup any
|
||||||
* resources that have been allocated for the management of the file
|
* resources that have been allocated for the management of the file
|
||||||
*/
|
*/
|
||||||
@@ -147,16 +151,20 @@ int imfs_dir_close(
|
|||||||
rtems_libio_t *iop
|
rtems_libio_t *iop
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* The generic close routine handles the deallocation of the file control */
|
/*
|
||||||
/* and associated memory. At present the imfs_dir_close simply */
|
* The generic close routine handles the deallocation of the file control
|
||||||
/* returns a successful completion status */
|
* and associated memory. At present the imfs_dir_close simply
|
||||||
|
* returns a successful completion status.
|
||||||
|
*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_lseek
|
||||||
|
*
|
||||||
* This routine will behave in one of three ways based on the state of
|
* This routine will behave in one of three ways based on the state of
|
||||||
* argument whence. Based on the state of its value the offset argument will
|
* argument whence. Based on the state of its value the offset argument will
|
||||||
* be interpreted using one of the following methods:
|
* be interpreted using one of the following methods:
|
||||||
@@ -180,8 +188,7 @@ int imfs_dir_lseek(
|
|||||||
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
||||||
|
|
||||||
|
|
||||||
switch( whence )
|
switch( whence ) {
|
||||||
{
|
|
||||||
case SEEK_SET: /* absolute move from the start of the file */
|
case SEEK_SET: /* absolute move from the start of the file */
|
||||||
iop->offset = normal_offset;
|
iop->offset = normal_offset;
|
||||||
break;
|
break;
|
||||||
@@ -203,7 +210,9 @@ int imfs_dir_lseek(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_fstat
|
||||||
|
*
|
||||||
* This routine will obtain the following information concerning the current
|
* This routine will obtain the following information concerning the current
|
||||||
* directory:
|
* directory:
|
||||||
* st_dev 0ll
|
* st_dev 0ll
|
||||||
|
|||||||
@@ -36,10 +36,3 @@ rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
|
|||||||
imfs_dir_rmnod
|
imfs_dir_rmnod
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
|
|
||||||
|
2000-08-25 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* libc/isatty.c, libc/imfs_handlers_directory.c, libc/creat.c,
|
||||||
|
libc/imfs_directory.c: Fixed style issues.
|
||||||
|
|
||||||
2000-08-11 Chris Johns <ccj@acm.org>
|
2000-08-11 Chris Johns <ccj@acm.org>
|
||||||
|
|
||||||
* libc/chmod.c: Return ENOTSUP if filesystem does not have handler.
|
* libc/chmod.c: Return ENOTSUP if filesystem does not have handler.
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
/* creat() "system call" */
|
/* creat() "system call" */
|
||||||
|
|
||||||
/* This is needed by f2c and therefore the SPEC benchmarks. */
|
/* This is needed by f2c and therefore the SPEC benchmarks. */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* XXX
|
* IMFS Directory Access Routines
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-1999.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
@@ -25,7 +25,9 @@
|
|||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_open
|
||||||
|
*
|
||||||
* This rountine will verify that the node being opened as a directory is
|
* This rountine will verify that the node being opened as a directory is
|
||||||
* in fact a directory node. If it is then the offset into the directory
|
* in fact a directory node. If it is then the offset into the directory
|
||||||
* will be set to 0 to position to the first directory entry.
|
* will be set to 0 to position to the first directory entry.
|
||||||
@@ -50,9 +52,9 @@ int imfs_dir_open(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* imfs_dir_read
|
||||||
/* -----------------------------------------------------------------------
|
*
|
||||||
* This routine will read the next directory entry based on the directory
|
* This routine will read the next directory entry based on the directory
|
||||||
* offset. The offset should be equal to -n- time the size of an individual
|
* offset. The offset should be equal to -n- time the size of an individual
|
||||||
* dirent structure. If n is not an integer multiple of the sizeof a
|
* dirent structure. If n is not an integer multiple of the sizeof a
|
||||||
@@ -138,7 +140,9 @@ int imfs_dir_read(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_close
|
||||||
|
*
|
||||||
* This routine will be called by the generic close routine to cleanup any
|
* This routine will be called by the generic close routine to cleanup any
|
||||||
* resources that have been allocated for the management of the file
|
* resources that have been allocated for the management of the file
|
||||||
*/
|
*/
|
||||||
@@ -147,16 +151,20 @@ int imfs_dir_close(
|
|||||||
rtems_libio_t *iop
|
rtems_libio_t *iop
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* The generic close routine handles the deallocation of the file control */
|
/*
|
||||||
/* and associated memory. At present the imfs_dir_close simply */
|
* The generic close routine handles the deallocation of the file control
|
||||||
/* returns a successful completion status */
|
* and associated memory. At present the imfs_dir_close simply
|
||||||
|
* returns a successful completion status.
|
||||||
|
*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_lseek
|
||||||
|
*
|
||||||
* This routine will behave in one of three ways based on the state of
|
* This routine will behave in one of three ways based on the state of
|
||||||
* argument whence. Based on the state of its value the offset argument will
|
* argument whence. Based on the state of its value the offset argument will
|
||||||
* be interpreted using one of the following methods:
|
* be interpreted using one of the following methods:
|
||||||
@@ -180,8 +188,7 @@ int imfs_dir_lseek(
|
|||||||
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
||||||
|
|
||||||
|
|
||||||
switch( whence )
|
switch( whence ) {
|
||||||
{
|
|
||||||
case SEEK_SET: /* absolute move from the start of the file */
|
case SEEK_SET: /* absolute move from the start of the file */
|
||||||
iop->offset = normal_offset;
|
iop->offset = normal_offset;
|
||||||
break;
|
break;
|
||||||
@@ -203,7 +210,9 @@ int imfs_dir_lseek(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_fstat
|
||||||
|
*
|
||||||
* This routine will obtain the following information concerning the current
|
* This routine will obtain the following information concerning the current
|
||||||
* directory:
|
* directory:
|
||||||
* st_dev 0ll
|
* st_dev 0ll
|
||||||
|
|||||||
@@ -36,10 +36,3 @@ rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
|
|||||||
imfs_dir_rmnod
|
imfs_dir_rmnod
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,27 @@
|
|||||||
/* isatty.c */
|
/*
|
||||||
|
* COPYRIGHT (c) 1989-1999.
|
||||||
/* Dumb implementation so programs will at least run. */
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int isatty(
|
||||||
isatty (int fd)
|
int fd
|
||||||
|
)
|
||||||
{
|
{
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
|
|
||||||
if (fstat (fd, &buf) < 0)
|
if (fstat (fd, &buf) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (S_ISCHR (buf.st_mode))
|
if (S_ISCHR (buf.st_mode))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* XXX
|
* IMFS Directory Access Routines
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-1999.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
@@ -25,7 +25,9 @@
|
|||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_open
|
||||||
|
*
|
||||||
* This rountine will verify that the node being opened as a directory is
|
* This rountine will verify that the node being opened as a directory is
|
||||||
* in fact a directory node. If it is then the offset into the directory
|
* in fact a directory node. If it is then the offset into the directory
|
||||||
* will be set to 0 to position to the first directory entry.
|
* will be set to 0 to position to the first directory entry.
|
||||||
@@ -50,9 +52,9 @@ int imfs_dir_open(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* imfs_dir_read
|
||||||
/* -----------------------------------------------------------------------
|
*
|
||||||
* This routine will read the next directory entry based on the directory
|
* This routine will read the next directory entry based on the directory
|
||||||
* offset. The offset should be equal to -n- time the size of an individual
|
* offset. The offset should be equal to -n- time the size of an individual
|
||||||
* dirent structure. If n is not an integer multiple of the sizeof a
|
* dirent structure. If n is not an integer multiple of the sizeof a
|
||||||
@@ -138,7 +140,9 @@ int imfs_dir_read(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_close
|
||||||
|
*
|
||||||
* This routine will be called by the generic close routine to cleanup any
|
* This routine will be called by the generic close routine to cleanup any
|
||||||
* resources that have been allocated for the management of the file
|
* resources that have been allocated for the management of the file
|
||||||
*/
|
*/
|
||||||
@@ -147,16 +151,20 @@ int imfs_dir_close(
|
|||||||
rtems_libio_t *iop
|
rtems_libio_t *iop
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* The generic close routine handles the deallocation of the file control */
|
/*
|
||||||
/* and associated memory. At present the imfs_dir_close simply */
|
* The generic close routine handles the deallocation of the file control
|
||||||
/* returns a successful completion status */
|
* and associated memory. At present the imfs_dir_close simply
|
||||||
|
* returns a successful completion status.
|
||||||
|
*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_lseek
|
||||||
|
*
|
||||||
* This routine will behave in one of three ways based on the state of
|
* This routine will behave in one of three ways based on the state of
|
||||||
* argument whence. Based on the state of its value the offset argument will
|
* argument whence. Based on the state of its value the offset argument will
|
||||||
* be interpreted using one of the following methods:
|
* be interpreted using one of the following methods:
|
||||||
@@ -180,8 +188,7 @@ int imfs_dir_lseek(
|
|||||||
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
||||||
|
|
||||||
|
|
||||||
switch( whence )
|
switch( whence ) {
|
||||||
{
|
|
||||||
case SEEK_SET: /* absolute move from the start of the file */
|
case SEEK_SET: /* absolute move from the start of the file */
|
||||||
iop->offset = normal_offset;
|
iop->offset = normal_offset;
|
||||||
break;
|
break;
|
||||||
@@ -203,7 +210,9 @@ int imfs_dir_lseek(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_fstat
|
||||||
|
*
|
||||||
* This routine will obtain the following information concerning the current
|
* This routine will obtain the following information concerning the current
|
||||||
* directory:
|
* directory:
|
||||||
* st_dev 0ll
|
* st_dev 0ll
|
||||||
|
|||||||
@@ -36,10 +36,3 @@ rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
|
|||||||
imfs_dir_rmnod
|
imfs_dir_rmnod
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
/* creat() "system call" */
|
/* creat() "system call" */
|
||||||
|
|
||||||
/* This is needed by f2c and therefore the SPEC benchmarks. */
|
/* This is needed by f2c and therefore the SPEC benchmarks. */
|
||||||
|
|||||||
@@ -1,17 +1,27 @@
|
|||||||
/* isatty.c */
|
/*
|
||||||
|
* COPYRIGHT (c) 1989-1999.
|
||||||
/* Dumb implementation so programs will at least run. */
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int isatty(
|
||||||
isatty (int fd)
|
int fd
|
||||||
|
)
|
||||||
{
|
{
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
|
|
||||||
if (fstat (fd, &buf) < 0)
|
if (fstat (fd, &buf) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (S_ISCHR (buf.st_mode))
|
if (S_ISCHR (buf.st_mode))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* XXX
|
* IMFS Directory Access Routines
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-1999.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
@@ -25,7 +25,9 @@
|
|||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_open
|
||||||
|
*
|
||||||
* This rountine will verify that the node being opened as a directory is
|
* This rountine will verify that the node being opened as a directory is
|
||||||
* in fact a directory node. If it is then the offset into the directory
|
* in fact a directory node. If it is then the offset into the directory
|
||||||
* will be set to 0 to position to the first directory entry.
|
* will be set to 0 to position to the first directory entry.
|
||||||
@@ -50,9 +52,9 @@ int imfs_dir_open(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* imfs_dir_read
|
||||||
/* -----------------------------------------------------------------------
|
*
|
||||||
* This routine will read the next directory entry based on the directory
|
* This routine will read the next directory entry based on the directory
|
||||||
* offset. The offset should be equal to -n- time the size of an individual
|
* offset. The offset should be equal to -n- time the size of an individual
|
||||||
* dirent structure. If n is not an integer multiple of the sizeof a
|
* dirent structure. If n is not an integer multiple of the sizeof a
|
||||||
@@ -138,7 +140,9 @@ int imfs_dir_read(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_close
|
||||||
|
*
|
||||||
* This routine will be called by the generic close routine to cleanup any
|
* This routine will be called by the generic close routine to cleanup any
|
||||||
* resources that have been allocated for the management of the file
|
* resources that have been allocated for the management of the file
|
||||||
*/
|
*/
|
||||||
@@ -147,16 +151,20 @@ int imfs_dir_close(
|
|||||||
rtems_libio_t *iop
|
rtems_libio_t *iop
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* The generic close routine handles the deallocation of the file control */
|
/*
|
||||||
/* and associated memory. At present the imfs_dir_close simply */
|
* The generic close routine handles the deallocation of the file control
|
||||||
/* returns a successful completion status */
|
* and associated memory. At present the imfs_dir_close simply
|
||||||
|
* returns a successful completion status.
|
||||||
|
*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_lseek
|
||||||
|
*
|
||||||
* This routine will behave in one of three ways based on the state of
|
* This routine will behave in one of three ways based on the state of
|
||||||
* argument whence. Based on the state of its value the offset argument will
|
* argument whence. Based on the state of its value the offset argument will
|
||||||
* be interpreted using one of the following methods:
|
* be interpreted using one of the following methods:
|
||||||
@@ -180,8 +188,7 @@ int imfs_dir_lseek(
|
|||||||
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
|
||||||
|
|
||||||
|
|
||||||
switch( whence )
|
switch( whence ) {
|
||||||
{
|
|
||||||
case SEEK_SET: /* absolute move from the start of the file */
|
case SEEK_SET: /* absolute move from the start of the file */
|
||||||
iop->offset = normal_offset;
|
iop->offset = normal_offset;
|
||||||
break;
|
break;
|
||||||
@@ -203,7 +210,9 @@ int imfs_dir_lseek(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/*
|
||||||
|
* imfs_dir_fstat
|
||||||
|
*
|
||||||
* This routine will obtain the following information concerning the current
|
* This routine will obtain the following information concerning the current
|
||||||
* directory:
|
* directory:
|
||||||
* st_dev 0ll
|
* st_dev 0ll
|
||||||
|
|||||||
@@ -36,10 +36,3 @@ rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
|
|||||||
imfs_dir_rmnod
|
imfs_dir_rmnod
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user