Rename fs/fs_internal.h to fs/fs.h

This commit is contained in:
Gregory Nutt 2014-09-28 09:13:56 -06:00
parent 8634a5e41c
commit d038133501
62 changed files with 107 additions and 89 deletions

View File

@ -41,7 +41,7 @@
#include <stdbool.h>
#include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h>
#include <fs_internal.h>
#include "fs.h"
#include <queue.h>
#include <arch/irq.h>
#include <rgmp/rtos.h>

View File

@ -48,7 +48,7 @@
#include <nuttx/fs/fat.h>
#include <nuttx/fs/mkfatfs.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_fat32.h"
#include "fs_mkfatfs.h"

View File

@ -63,11 +63,11 @@
#include <nuttx/fs/fat.h>
#include <nuttx/fs/dirent.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_fat32.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View File

@ -52,7 +52,7 @@
#include <nuttx/fs/dirent.h>
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View File

@ -45,7 +45,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/fat.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_fat32.h"
/****************************************************************************

View File

@ -83,11 +83,11 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/fat.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_fat32.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View File

@ -60,11 +60,11 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/fat.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_fat32.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View File

@ -50,7 +50,7 @@
#include <nuttx/fs/fat.h>
#include <nuttx/fs/mkfatfs.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_fat32.h"
#include "fs_mkfatfs.h"

View File

@ -48,7 +48,7 @@
#include <nuttx/fs/fat.h>
#include <nuttx/fs/mkfatfs.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_fat32.h"
#include "fs_mkfatfs.h"

View File

@ -1,5 +1,5 @@
/****************************************************************************
* fs/fs_internal.h
* fs/fs.h
*
* Copyright (C) 2007, 2009, 2012, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef __FS_FS_INTERNAL_H
#define __FS_FS_INTERNAL_H
#ifndef _FS_FS_H
#define _FS_FS_H
/****************************************************************************
* Included Files
@ -52,26 +52,44 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Inode i_flag values */
#define FSNODEFLAG_TYPE_MASK 0x00000003
#define FSNODEFLAG_TYPE_DRIVER 0x00000000
#define FSNODEFLAG_TYPE_BLOCK 0x00000001
#define FSNODEFLAG_TYPE_MOUNTPT 0x00000002
#define FSNODEFLAG_DELETED 0x00000004
#define FSNODEFLAG_TYPE_MASK 0x00000007 /* Isolates type field */
#define FSNODEFLAG_TYPE_DRIVER 0x00000000 /* Character driver */
#define FSNODEFLAG_TYPE_BLOCK 0x00000001 /* Block driver */
#define FSNODEFLAG_TYPE_MOUNTPT 0x00000002 /* Mount point */
#define FSNODEFLAG_TYPE_SPECIAL 0x00000004 /* Special OS type */
#define FSNODEFLAG_TYPE_NAMEDSEM 0x00000004 /* Named semaphore */
#define FSNODEFLAG_TYPE_MQUEUE 0x00000005 /* Message Queue */
#define FSNODEFLAG_TYPE_SHM 0x00000006 /* Shared memory region */
#define FSNODEFLAG_DELETED 0x00000008 /* Unlinked */
#define INODE_IS_DRIVER(i) \
(((i)->i_flags & FSNODEFLAG_TYPE_MASK) == FSNODEFLAG_TYPE_DRIVER)
#define INODE_IS_BLOCK(i) \
(((i)->i_flags & FSNODEFLAG_TYPE_BLOCK) == FSNODEFLAG_TYPE_BLOCK)
#define INODE_IS_MOUNTPT(i) \
(((i)->i_flags & FSNODEFLAG_TYPE_MOUNTPT) == FSNODEFLAG_TYPE_MOUNTPT)
#define INODE_IS_TYPE(i,t) \
(((i)->i_flags & FSNODEFLAG_TYPE_MASK) == (t))
#define INODE_IS_SPECIAL(i) \
(((i)->i_flags & FSNODEFLAG_TYPE_SPECIAL) != 0)
#define INODE_SET_DRIVER(i) \
((i)->i_flags &= ~FSNODEFLAG_TYPE_MASK)
#define INODE_SET_BLOCK(i) \
((i)->i_flags = (((i)->i_flags & ~FSNODEFLAG_TYPE_MASK) | FSNODEFLAG_TYPE_BLOCK))
#define INODE_SET_MOUNTPT(i) \
((i)->i_flags = (((i)->i_flags & ~FSNODEFLAG_TYPE_MASK) | FSNODEFLAG_TYPE_MOUNTPT))
#define INODE_IS_DRIVER(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_DRIVER)
#define INODE_IS_BLOCK(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_BLOCK)
#define INODE_IS_MOUNTPT(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MOUNTPT)
#define INODE_IS_NAMEDSEM(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_NAMEDSEM)
#define INODE_IS_MQUEUE(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MQUEUE)
#define INODE_IS_SHM(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_SHM)
#define INODE_GET_TYPE(i) ((i)->i_flags & FSNODEFLAG_TYPE_MASK)
#define INODE_SET_TYPE(i,t) \
do \
{ \
(i)->i_flags = ((i)->i_flags & ~FSNODEFLAG_TYPE_MASK) | (t); \
} \
while (0)
#define INODE_SET_DRIVER(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_DRIVER)
#define INODE_SET_BLOCK(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_BLOCK)
#define INODE_SET_MOUNTPT(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_MOUNTPT)
#define INODE_SET_NAMEDSEM(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_NAMEDSEM)
#define INODE_SET_MQUEUE(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_MQUEUE)
#define INODE_SET_SHM(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_SHM)
/* Mountpoint fd_flags values */
@ -343,4 +361,4 @@ int find_blockdriver(FAR const char *pathname, int mountflags,
}
#endif
#endif /* __FS_FS_INTERNAL_H */
#endif /* _FS_FS_H */

View File

@ -55,7 +55,7 @@
#include <nuttx/wqueue.h>
#include <nuttx/fs/automount.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -48,7 +48,7 @@
# include <nuttx/net/net.h>
#endif
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Global Functions

View File

@ -43,7 +43,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -46,7 +46,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -44,7 +44,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -43,7 +43,7 @@
#include <sched.h>
#include <errno.h>
#include "fs_internal.h"
#include "fs.h"
/* This logic in this applies only when both socket and file descriptors are
* in that case, this function descriminates which type of dup2 is being

View File

@ -48,7 +48,7 @@
#include <nuttx/net/net.h>
#include <nuttx/sched.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -45,7 +45,7 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
#if CONFIG_NFILE_DESCRIPTORS > 0

View File

@ -43,7 +43,7 @@
#include <sched.h>
#include <errno.h>
#include "fs_internal.h"
#include "fs.h"
#if CONFIG_NFILE_DESCRIPTORS > 0

View File

@ -49,7 +49,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -44,7 +44,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -47,7 +47,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -49,7 +49,7 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
#ifndef CONFIG_DISABLE_MOUNTPOUNT

View File

@ -47,7 +47,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/sched.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -46,7 +46,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -41,7 +41,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -39,7 +39,7 @@
#include <nuttx/config.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -42,7 +42,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -44,7 +44,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -44,10 +44,10 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View File

@ -45,7 +45,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -50,7 +50,7 @@
# include <nuttx/net/net.h>
#endif
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Global Functions

View File

@ -45,7 +45,7 @@
#include <errno.h>
#include <assert.h>
#include "fs_internal.h"
#include "fs.h"
#if CONFIG_NFILE_DESCRIPTORS > 0

View File

@ -43,7 +43,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -47,7 +47,7 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/* At least one filesystem must be defined, or this file will not compile.
* It may be desire-able to make filesystems dynamically registered at

View File

@ -50,7 +50,7 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -43,7 +43,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -49,7 +49,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -52,7 +52,7 @@
#include <arch/irq.h>
#include "fs_internal.h"
#include "fs.h"
#ifndef CONFIG_DISABLE_POLL

View File

@ -46,7 +46,7 @@
#include <sched.h>
#include <errno.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -46,7 +46,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -44,10 +44,10 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Definitions
* Pre-processor oDefinitions
****************************************************************************/
/****************************************************************************

View File

@ -44,10 +44,10 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View File

@ -43,7 +43,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -45,7 +45,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -43,7 +43,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -46,7 +46,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -51,7 +51,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
#ifndef CONFIG_DISABLE_POLL

View File

@ -44,7 +44,7 @@
#include <sched.h>
#include <errno.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -45,7 +45,7 @@
#include <sched.h>
#include <errno.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -53,7 +53,7 @@
#include <nuttx/arch.h>
#include <nuttx/syslog/syslog.h>
#include "fs_internal.h"
#include "fs.h"
#if defined(CONFIG_SYSLOG) && defined(CONFIG_SYSLOG_CHAR)

View File

@ -43,7 +43,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -43,7 +43,7 @@
#include <errno.h>
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -41,7 +41,7 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -41,7 +41,7 @@
#include <nuttx/fs/fs.h>
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -49,7 +49,7 @@
# include <sys/socket.h>
#endif
#include "fs_internal.h"
#include "fs.h"
/****************************************************************************
* Private Functions

View File

@ -46,7 +46,7 @@
#include <errno.h>
#include <debug.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_rammap.h"
/****************************************************************************

View File

@ -49,7 +49,7 @@
#include <nuttx/kmalloc.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_rammap.h"
#ifdef CONFIG_FS_RAMMAP

View File

@ -49,7 +49,7 @@
#include <nuttx/kmalloc.h>
#include "fs_internal.h"
#include "fs.h"
#include "fs_rammap.h"
#ifdef CONFIG_FS_RAMMAP

View File

@ -49,10 +49,10 @@
#include <nuttx/fs/dirent.h>
#include "../fs_internal.h"
#include "../fs.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/* Volume header (multi-byte values are big-endian) */

View File

@ -63,7 +63,7 @@
#include "smartfs.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View File

@ -57,7 +57,7 @@
#include "smartfs.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************