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
+1 -1
View File
@@ -41,7 +41,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <fs_internal.h> #include "fs.h"
#include <queue.h> #include <queue.h>
#include <arch/irq.h> #include <arch/irq.h>
#include <rgmp/rtos.h> #include <rgmp/rtos.h>
+1 -1
View File
@@ -48,7 +48,7 @@
#include <nuttx/fs/fat.h> #include <nuttx/fs/fat.h>
#include <nuttx/fs/mkfatfs.h> #include <nuttx/fs/mkfatfs.h>
#include "fs_internal.h" #include "fs.h"
#include "fs_fat32.h" #include "fs_fat32.h"
#include "fs_mkfatfs.h" #include "fs_mkfatfs.h"
+2 -2
View File
@@ -63,11 +63,11 @@
#include <nuttx/fs/fat.h> #include <nuttx/fs/fat.h>
#include <nuttx/fs/dirent.h> #include <nuttx/fs/dirent.h>
#include "fs_internal.h" #include "fs.h"
#include "fs_fat32.h" #include "fs_fat32.h"
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -52,7 +52,7 @@
#include <nuttx/fs/dirent.h> #include <nuttx/fs/dirent.h>
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -45,7 +45,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/fat.h> #include <nuttx/fs/fat.h>
#include "fs_internal.h" #include "fs.h"
#include "fs_fat32.h" #include "fs_fat32.h"
/**************************************************************************** /****************************************************************************
+2 -2
View File
@@ -83,11 +83,11 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/fat.h> #include <nuttx/fs/fat.h>
#include "fs_internal.h" #include "fs.h"
#include "fs_fat32.h" #include "fs_fat32.h"
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+2 -2
View File
@@ -60,11 +60,11 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/fat.h> #include <nuttx/fs/fat.h>
#include "fs_internal.h" #include "fs.h"
#include "fs_fat32.h" #include "fs_fat32.h"
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -50,7 +50,7 @@
#include <nuttx/fs/fat.h> #include <nuttx/fs/fat.h>
#include <nuttx/fs/mkfatfs.h> #include <nuttx/fs/mkfatfs.h>
#include "fs_internal.h" #include "fs.h"
#include "fs_fat32.h" #include "fs_fat32.h"
#include "fs_mkfatfs.h" #include "fs_mkfatfs.h"
+1 -1
View File
@@ -48,7 +48,7 @@
#include <nuttx/fs/fat.h> #include <nuttx/fs/fat.h>
#include <nuttx/fs/mkfatfs.h> #include <nuttx/fs/mkfatfs.h>
#include "fs_internal.h" #include "fs.h"
#include "fs_fat32.h" #include "fs_fat32.h"
#include "fs_mkfatfs.h" #include "fs_mkfatfs.h"
+39 -21
View File
@@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* fs/fs_internal.h * fs/fs.h
* *
* Copyright (C) 2007, 2009, 2012, 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009, 2012, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,8 +33,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __FS_FS_INTERNAL_H #ifndef _FS_FS_H
#define __FS_FS_INTERNAL_H #define _FS_FS_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@@ -52,26 +52,44 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Inode i_flag values */
#define FSNODEFLAG_TYPE_MASK 0x00000003 #define FSNODEFLAG_TYPE_MASK 0x00000007 /* Isolates type field */
#define FSNODEFLAG_TYPE_DRIVER 0x00000000 #define FSNODEFLAG_TYPE_DRIVER 0x00000000 /* Character driver */
#define FSNODEFLAG_TYPE_BLOCK 0x00000001 #define FSNODEFLAG_TYPE_BLOCK 0x00000001 /* Block driver */
#define FSNODEFLAG_TYPE_MOUNTPT 0x00000002 #define FSNODEFLAG_TYPE_MOUNTPT 0x00000002 /* Mount point */
#define FSNODEFLAG_DELETED 0x00000004 #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) \ #define INODE_IS_TYPE(i,t) \
(((i)->i_flags & FSNODEFLAG_TYPE_MASK) == FSNODEFLAG_TYPE_DRIVER) (((i)->i_flags & FSNODEFLAG_TYPE_MASK) == (t))
#define INODE_IS_BLOCK(i) \ #define INODE_IS_SPECIAL(i) \
(((i)->i_flags & FSNODEFLAG_TYPE_BLOCK) == FSNODEFLAG_TYPE_BLOCK) (((i)->i_flags & FSNODEFLAG_TYPE_SPECIAL) != 0)
#define INODE_IS_MOUNTPT(i) \
(((i)->i_flags & FSNODEFLAG_TYPE_MOUNTPT) == FSNODEFLAG_TYPE_MOUNTPT)
#define INODE_SET_DRIVER(i) \ #define INODE_IS_DRIVER(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_DRIVER)
((i)->i_flags &= ~FSNODEFLAG_TYPE_MASK) #define INODE_IS_BLOCK(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_BLOCK)
#define INODE_SET_BLOCK(i) \ #define INODE_IS_MOUNTPT(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MOUNTPT)
((i)->i_flags = (((i)->i_flags & ~FSNODEFLAG_TYPE_MASK) | FSNODEFLAG_TYPE_BLOCK)) #define INODE_IS_NAMEDSEM(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_NAMEDSEM)
#define INODE_SET_MOUNTPT(i) \ #define INODE_IS_MQUEUE(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MQUEUE)
((i)->i_flags = (((i)->i_flags & ~FSNODEFLAG_TYPE_MASK) | FSNODEFLAG_TYPE_MOUNTPT)) #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 */ /* Mountpoint fd_flags values */
@@ -343,4 +361,4 @@ int find_blockdriver(FAR const char *pathname, int mountflags,
} }
#endif #endif
#endif /* __FS_FS_INTERNAL_H */ #endif /* _FS_FS_H */
+1 -1
View File
@@ -55,7 +55,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/fs/automount.h> #include <nuttx/fs/automount.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -48,7 +48,7 @@
# include <nuttx/net/net.h> # include <nuttx/net/net.h>
#endif #endif
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Global Functions * Global Functions
+1 -1
View File
@@ -43,7 +43,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h> #include <nuttx/fs/dirent.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -44,7 +44,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -43,7 +43,7 @@
#include <sched.h> #include <sched.h>
#include <errno.h> #include <errno.h>
#include "fs_internal.h" #include "fs.h"
/* This logic in this applies only when both socket and file descriptors are /* 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 * in that case, this function descriminates which type of dup2 is being
+1 -1
View File
@@ -48,7 +48,7 @@
#include <nuttx/net/net.h> #include <nuttx/net/net.h>
#include <nuttx/sched.h> #include <nuttx/sched.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -45,7 +45,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
#if CONFIG_NFILE_DESCRIPTORS > 0 #if CONFIG_NFILE_DESCRIPTORS > 0
+1 -1
View File
@@ -43,7 +43,7 @@
#include <sched.h> #include <sched.h>
#include <errno.h> #include <errno.h>
#include "fs_internal.h" #include "fs.h"
#if CONFIG_NFILE_DESCRIPTORS > 0 #if CONFIG_NFILE_DESCRIPTORS > 0
+1 -1
View File
@@ -49,7 +49,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -44,7 +44,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -47,7 +47,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -49,7 +49,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
#ifndef CONFIG_DISABLE_MOUNTPOUNT #ifndef CONFIG_DISABLE_MOUNTPOUNT
+1 -1
View File
@@ -47,7 +47,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/sched.h> #include <nuttx/sched.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -41,7 +41,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -42,7 +42,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+2 -2
View File
@@ -44,10 +44,10 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -45,7 +45,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -50,7 +50,7 @@
# include <nuttx/net/net.h> # include <nuttx/net/net.h>
#endif #endif
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Global Functions * Global Functions
+1 -1
View File
@@ -45,7 +45,7 @@
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include "fs_internal.h" #include "fs.h"
#if CONFIG_NFILE_DESCRIPTORS > 0 #if CONFIG_NFILE_DESCRIPTORS > 0
+1 -1
View File
@@ -43,7 +43,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -47,7 +47,7 @@
#include <nuttx/fs/fs.h> #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. /* At least one filesystem must be defined, or this file will not compile.
* It may be desire-able to make filesystems dynamically registered at * It may be desire-able to make filesystems dynamically registered at
+1 -1
View File
@@ -50,7 +50,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -43,7 +43,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -49,7 +49,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h> #include <nuttx/fs/dirent.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -52,7 +52,7 @@
#include <arch/irq.h> #include <arch/irq.h>
#include "fs_internal.h" #include "fs.h"
#ifndef CONFIG_DISABLE_POLL #ifndef CONFIG_DISABLE_POLL
+1 -1
View File
@@ -46,7 +46,7 @@
#include <sched.h> #include <sched.h>
#include <errno.h> #include <errno.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h> #include <nuttx/fs/dirent.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+2 -2
View File
@@ -44,10 +44,10 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor oDefinitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+2 -2
View File
@@ -44,10 +44,10 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -43,7 +43,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -45,7 +45,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h> #include <nuttx/fs/dirent.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -43,7 +43,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/dirent.h> #include <nuttx/fs/dirent.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -51,7 +51,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "fs_internal.h" #include "fs.h"
#ifndef CONFIG_DISABLE_POLL #ifndef CONFIG_DISABLE_POLL
+1 -1
View File
@@ -44,7 +44,7 @@
#include <sched.h> #include <sched.h>
#include <errno.h> #include <errno.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -45,7 +45,7 @@
#include <sched.h> #include <sched.h>
#include <errno.h> #include <errno.h>
#include "fs_internal.h" #include "fs.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions

Some files were not shown because too many files have changed in this diff Show More