Browse Source

Improve include policy

pull/1/head
gkostka 10 years ago
parent
commit
eddcd695d0
  1. 23
      lwext4/ext4.c
  2. 5
      lwext4/ext4.h
  3. 14
      lwext4/ext4_balloc.c
  4. 4
      lwext4/ext4_balloc.h
  5. 8
      lwext4/ext4_bcache.c
  6. 2
      lwext4/ext4_bcache.h
  7. 6
      lwext4/ext4_bitmap.c
  8. 3
      lwext4/ext4_bitmap.h
  9. 4
      lwext4/ext4_block_group.c
  10. 6
      lwext4/ext4_block_group.h
  11. 8
      lwext4/ext4_blockdev.c
  12. 6
      lwext4/ext4_blockdev.h
  13. 4
      lwext4/ext4_crc32c.c
  14. 3
      lwext4/ext4_crc32c.h
  15. 4
      lwext4/ext4_debug.c
  16. 5
      lwext4/ext4_debug.h
  17. 10
      lwext4/ext4_dir.c
  18. 8
      lwext4/ext4_dir.h
  19. 14
      lwext4/ext4_dir_idx.c
  20. 4
      lwext4/ext4_dir_idx.h
  21. 2
      lwext4/ext4_errno.h
  22. 12
      lwext4/ext4_extent.c
  23. 4
      lwext4/ext4_extent.h
  24. 27
      lwext4/ext4_fs.c
  25. 4
      lwext4/ext4_fs.h
  26. 8
      lwext4/ext4_hash.c
  27. 2
      lwext4/ext4_hash.h
  28. 16
      lwext4/ext4_ialloc.c
  29. 4
      lwext4/ext4_ialloc.h
  30. 8
      lwext4/ext4_inode.c
  31. 3
      lwext4/ext4_inode.h
  32. 4
      lwext4/ext4_super.c
  33. 4
      lwext4/ext4_super.h
  34. 4
      lwext4/ext4_types.h

23
lwext4/ext4.c

@ -34,21 +34,22 @@
* @brief Ext4 high level operations (file, directory, mountpoints...)
*/
#include <ext4_config.h>
#include <ext4_blockdev.h>
#include <ext4_types.h>
#include <ext4_debug.h>
#include <ext4_errno.h>
#include <ext4_fs.h>
#include <ext4_dir.h>
#include <ext4_inode.h>
#include <ext4_super.h>
#include <ext4_dir_idx.h>
#include "ext4_config.h"
#include "ext4_blockdev.h"
#include "ext4_types.h"
#include "ext4_debug.h"
#include "ext4_errno.h"
#include "ext4_fs.h"
#include "ext4_dir.h"
#include "ext4_inode.h"
#include "ext4_super.h"
#include "ext4_dir_idx.h"
#include "ext4.h"
#include <stdlib.h>
#include <string.h>
#include <ext4.h>
/**@brief Mount point OS dependent lock*/
#define EXT4_MP_LOCK(_m) \

5
lwext4/ext4.h

@ -38,8 +38,9 @@
#ifndef EXT4_H_
#define EXT4_H_
#include <ext4_config.h>
#include <ext4_blockdev.h>
#include "ext4_config.h"
#include "ext4_blockdev.h"
#include <stdint.h>
/********************************FILE OPEN FLAGS*****************************/

14
lwext4/ext4_balloc.c

@ -39,13 +39,13 @@
* @brief Physical block allocator.
*/
#include <ext4_config.h>
#include <ext4_balloc.h>
#include <ext4_super.h>
#include <ext4_block_group.h>
#include <ext4_fs.h>
#include <ext4_bitmap.h>
#include <ext4_inode.h>
#include "ext4_config.h"
#include "ext4_balloc.h"
#include "ext4_super.h"
#include "ext4_block_group.h"
#include "ext4_fs.h"
#include "ext4_bitmap.h"
#include "ext4_inode.h"
/**@brief Compute number of block group from block address.
* @param sb Superblock pointer.

4
lwext4/ext4_balloc.h

@ -42,8 +42,8 @@
#ifndef EXT4_BALLOC_H_
#define EXT4_BALLOC_H_
#include <ext4_config.h>
#include <ext4_types.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include <stdint.h>
#include <stdbool.h>

8
lwext4/ext4_bcache.c

@ -34,10 +34,10 @@
* @brief Block cache allocator.
*/
#include <ext4_config.h>
#include <ext4_bcache.h>
#include <ext4_debug.h>
#include <ext4_errno.h>
#include "ext4_config.h"
#include "ext4_bcache.h"
#include "ext4_debug.h"
#include "ext4_errno.h"
#include <string.h>
#include <stdlib.h>

2
lwext4/ext4_bcache.h

@ -37,7 +37,7 @@
#ifndef EXT4_BCACHE_H_
#define EXT4_BCACHE_H_
#include <ext4_config.h>
#include "ext4_config.h"
#include <stdint.h>
#include <stdbool.h>

6
lwext4/ext4_bitmap.c

@ -34,10 +34,10 @@
* @brief Block/inode bitmap allocator.
*/
#include <ext4_config.h>
#include <ext4_bitmap.h>
#include "ext4_config.h"
#include "ext4_bitmap.h"
#include <ext4_errno.h>
#include "ext4_errno.h"
void ext4_bmap_bits_free(uint8_t *bmap, uint32_t sbit, uint32_t bcnt)
{

3
lwext4/ext4_bitmap.h

@ -37,7 +37,8 @@
#ifndef EXT4_BITMAP_H_
#define EXT4_BITMAP_H_
#include <ext4_config.h>
#include "ext4_config.h"
#include <stdint.h>
#include <stdbool.h>

4
lwext4/ext4_block_group.c

@ -39,8 +39,8 @@
* @brief Block group function set.
*/
#include <ext4_config.h>
#include <ext4_block_group.h>
#include "ext4_config.h"
#include "ext4_block_group.h"
/**@brief CRC-16 look up table*/
static uint16_t const crc16_tab[256] = {

6
lwext4/ext4_block_group.h

@ -42,9 +42,9 @@
#ifndef EXT4_BLOCK_GROUP_H_
#define EXT4_BLOCK_GROUP_H_
#include <ext4_config.h>
#include <ext4_types.h>
#include <ext4_super.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_super.h"
#include <stdint.h>
#include <stdbool.h>

8
lwext4/ext4_blockdev.c

@ -34,10 +34,10 @@
* @brief Block device module.
*/
#include <ext4_config.h>
#include <ext4_blockdev.h>
#include <ext4_errno.h>
#include <ext4_debug.h>
#include "ext4_config.h"
#include "ext4_blockdev.h"
#include "ext4_errno.h"
#include "ext4_debug.h"
#include <string.h>
#include <stdlib.h>

6
lwext4/ext4_blockdev.h

@ -36,9 +36,9 @@
* @brief Block device module.
*/
#include <ext4_config.h>
#include <ext4_bcache.h>
#include <ext4_debug.h>
#include "ext4_config.h"
#include "ext4_bcache.h"
#include "ext4_debug.h"
#include <stdbool.h>
#include <stdint.h>

4
lwext4/ext4_crc32c.c

@ -36,8 +36,8 @@
* @brief Crc32c routine. Taken from FreeBSD kernel.
*/
#include <ext4_config.h>
#include <ext4_crc32c.h>
#include "ext4_config.h"
#include "ext4_crc32c.h"
/* */
/* CRC LOOKUP TABLE */

3
lwext4/ext4_crc32c.h

@ -39,7 +39,8 @@
#ifndef LWEXT4_EXT4_CRC32C_H_
#define LWEXT4_EXT4_CRC32C_H_
#include <ext4_config.h>
#include "ext4_config.h"
#include <stdint.h>
/**@brief CRC32C algorithm.

4
lwext4/ext4_debug.c

@ -34,8 +34,8 @@
* @brief Debug printf and assert macros.
*/
#include <ext4_config.h>
#include <ext4_debug.h>
#include "ext4_config.h"
#include "ext4_debug.h"
#include <stdarg.h>
#include <stdio.h>

5
lwext4/ext4_debug.h

@ -37,8 +37,9 @@
#ifndef EXT4_DEBUG_H_
#define EXT4_DEBUG_H_
#include <ext4_config.h>
#include <ext4_errno.h>
#include "ext4_config.h"
#include "ext4_errno.h"
#include <stdint.h>
#include <stdio.h>

10
lwext4/ext4_dir.c

@ -39,11 +39,11 @@
* @brief Directory handle procedures.
*/
#include <ext4_config.h>
#include <ext4_dir.h>
#include <ext4_dir_idx.h>
#include <ext4_inode.h>
#include <ext4_fs.h>
#include "ext4_config.h"
#include "ext4_dir.h"
#include "ext4_dir_idx.h"
#include "ext4_inode.h"
#include "ext4_fs.h"
#include <string.h>

8
lwext4/ext4_dir.h

@ -42,10 +42,10 @@
#ifndef EXT4_DIR_H_
#define EXT4_DIR_H_
#include <ext4_config.h>
#include <ext4_types.h>
#include <ext4_blockdev.h>
#include <ext4_super.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_blockdev.h"
#include "ext4_super.h"
#include <stdint.h>

14
lwext4/ext4_dir_idx.c

@ -34,13 +34,13 @@
* @brief Directory indexing procedures.
*/
#include <ext4_config.h>
#include <ext4_dir_idx.h>
#include <ext4_dir.h>
#include <ext4_blockdev.h>
#include <ext4_fs.h>
#include <ext4_super.h>
#include <ext4_hash.h>
#include "ext4_config.h"
#include "ext4_dir_idx.h"
#include "ext4_dir.h"
#include "ext4_blockdev.h"
#include "ext4_fs.h"
#include "ext4_super.h"
#include "ext4_hash.h"
#include <string.h>
#include <stdlib.h>

4
lwext4/ext4_dir_idx.h

@ -42,8 +42,8 @@
#ifndef EXT4_DIR_IDX_H_
#define EXT4_DIR_IDX_H_
#include <ext4_config.h>
#include <ext4_types.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include <stdint.h>
#include <stdbool.h>

2
lwext4/ext4_errno.h

@ -36,7 +36,7 @@
#ifndef EXT4_ERRNO_H_
#define EXT4_ERRNO_H_
#include <ext4_config.h>
#include "ext4_config.h"
#if !CONFIG_HAVE_OWN_ERRNO
#include <errno.h>

12
lwext4/ext4_extent.c

@ -39,12 +39,12 @@
* @brief More complex filesystem functions.
*/
#include <ext4_config.h>
#include <ext4_extent.h>
#include <ext4_inode.h>
#include <ext4_super.h>
#include <ext4_blockdev.h>
#include <ext4_balloc.h>
#include "ext4_config.h"
#include "ext4_extent.h"
#include "ext4_inode.h"
#include "ext4_super.h"
#include "ext4_blockdev.h"
#include "ext4_balloc.h"
#include <string.h>
#include <stdlib.h>

4
lwext4/ext4_extent.h

@ -41,8 +41,8 @@
#ifndef EXT4_EXTENT_H_
#define EXT4_EXTENT_H_
#include <ext4_config.h>
#include <ext4_types.h>
#include "ext4_config.h"
#include "ext4_types.h"
/**@brief Get logical number of the block covered by extent.
* @param extent Extent to load number from

27
lwext4/ext4_fs.c

@ -38,19 +38,20 @@
* @brief More complex filesystem functions.
*/
#include <ext4_config.h>
#include <ext4_types.h>
#include <ext4_fs.h>
#include <ext4_errno.h>
#include <ext4_blockdev.h>
#include <ext4_super.h>
#include <ext4_debug.h>
#include <ext4_block_group.h>
#include <ext4_balloc.h>
#include <ext4_bitmap.h>
#include <ext4_inode.h>
#include <ext4_ialloc.h>
#include <ext4_extent.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_fs.h"
#include "ext4_errno.h"
#include "ext4_blockdev.h"
#include "ext4_super.h"
#include "ext4_debug.h"
#include "ext4_block_group.h"
#include "ext4_balloc.h"
#include "ext4_bitmap.h"
#include "ext4_inode.h"
#include "ext4_ialloc.h"
#include "ext4_extent.h"
#include <string.h>
int ext4_fs_init(struct ext4_fs *fs, struct ext4_blockdev *bdev)

4
lwext4/ext4_fs.h

@ -42,8 +42,8 @@
#ifndef EXT4_FS_H_
#define EXT4_FS_H_
#include <ext4_config.h>
#include <ext4_types.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include <stdint.h>
#include <stdbool.h>

8
lwext4/ext4_hash.c

@ -61,10 +61,12 @@
* @brief Directory indexing hash functions.
*/
#include <ext4_config.h>
#include <ext4_types.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_errno.h"
#include <string.h>
#include <ext4_errno.h>
/* F, G, and H are MD4 functions */
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))

2
lwext4/ext4_hash.h

@ -37,7 +37,7 @@
#ifndef EXT4_HASH_H_
#define EXT4_HASH_H_
#include <ext4_config.h>
#include "ext4_config.h"
#include <stdint.h>

16
lwext4/ext4_ialloc.c

@ -39,14 +39,14 @@
* @brief Inode allocation procedures.
*/
#include <ext4_config.h>
#include <ext4_types.h>
#include <ext4_ialloc.h>
#include <ext4_super.h>
#include <ext4_fs.h>
#include <ext4_blockdev.h>
#include <ext4_block_group.h>
#include <ext4_bitmap.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_ialloc.h"
#include "ext4_super.h"
#include "ext4_fs.h"
#include "ext4_blockdev.h"
#include "ext4_block_group.h"
#include "ext4_bitmap.h"
/**@brief Convert i-node number to relative index in block group.
* @param sb Superblock

4
lwext4/ext4_ialloc.h

@ -46,8 +46,8 @@
extern "C" {
#endif
#include <ext4_config.h>
#include <ext4_types.h>
#include "ext4_config.h"
#include "ext4_types.h"
/**@brief Free i-node number and modify filesystem data structers.
* @param fs Filesystem, where the i-node is located

8
lwext4/ext4_inode.c

@ -39,10 +39,10 @@
* @brief Inode handle functions
*/
#include <ext4_config.h>
#include <ext4_types.h>
#include <ext4_inode.h>
#include <ext4_super.h>
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_inode.h"
#include "ext4_super.h"
/**@brief Compute number of bits for block count.
* @param block_size Filesystem block_size

3
lwext4/ext4_inode.h

@ -42,7 +42,8 @@
#ifndef EXT4_INODE_H_
#define EXT4_INODE_H_
#include <ext4_config.h>
#include "ext4_config.h"
#include <stdint.h>
/**@brief Get mode of the i-node.

4
lwext4/ext4_super.c

@ -39,8 +39,8 @@
* @brief Superblock operations.
*/
#include <ext4_config.h>
#include <ext4_super.h>
#include "ext4_config.h"
#include "ext4_super.h"
uint32_t ext4_block_group_cnt(struct ext4_sblock *s)
{

4
lwext4/ext4_super.h

@ -42,8 +42,8 @@
#ifndef EXT4_SUPER_H_
#define EXT4_SUPER_H_
#include <ext4_config.h>
#include <ext4_types.h>
#include "ext4_config.h"
#include "ext4_types.h"
/**@brief Blocks count get stored in superblock.
* @param s superblock descriptor

4
lwext4/ext4_types.h

@ -42,8 +42,8 @@
#ifndef EXT4_TYPES_H_
#define EXT4_TYPES_H_
#include <ext4_config.h>
#include <ext4_blockdev.h>
#include "ext4_config.h"
#include "ext4_blockdev.h"
#include <stdint.h>

Loading…
Cancel
Save