ref: eddcd695d0c06c5e2dbef7c23c4998405857df59
parent: 1a5e7936d092eb17327fe1df4f7d77adbf12d686
author: gkostka <kostka.grzegorz@gmail.com>
date: Sat Jun 27 19:37:09 EDT 2015
Improve include policy
--- a/lwext4/ext4.c
+++ b/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) \
--- a/lwext4/ext4.h
+++ b/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*****************************/
--- a/lwext4/ext4_balloc.c
+++ b/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.
--- a/lwext4/ext4_balloc.h
+++ b/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>
--- a/lwext4/ext4_bcache.c
+++ b/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>
--- a/lwext4/ext4_bcache.h
+++ b/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>
--- a/lwext4/ext4_bitmap.c
+++ b/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)
{
--- a/lwext4/ext4_bitmap.h
+++ b/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>
--- a/lwext4/ext4_block_group.c
+++ b/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] = {
--- a/lwext4/ext4_block_group.h
+++ b/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>
--- a/lwext4/ext4_blockdev.c
+++ b/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>
--- a/lwext4/ext4_blockdev.h
+++ b/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>
--- a/lwext4/ext4_crc32c.c
+++ b/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 */
--- a/lwext4/ext4_crc32c.h
+++ b/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.
--- a/lwext4/ext4_debug.c
+++ b/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>
--- a/lwext4/ext4_debug.h
+++ b/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>
--- a/lwext4/ext4_dir.c
+++ b/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>
--- a/lwext4/ext4_dir.h
+++ b/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>
--- a/lwext4/ext4_dir_idx.c
+++ b/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>
--- a/lwext4/ext4_dir_idx.h
+++ b/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>
--- a/lwext4/ext4_errno.h
+++ b/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>
--- a/lwext4/ext4_extent.c
+++ b/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>
--- a/lwext4/ext4_extent.h
+++ b/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
--- a/lwext4/ext4_fs.c
+++ b/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)
--- a/lwext4/ext4_fs.h
+++ b/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>
--- a/lwext4/ext4_hash.c
+++ b/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)))
--- a/lwext4/ext4_hash.h
+++ b/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>
--- a/lwext4/ext4_ialloc.c
+++ b/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
--- a/lwext4/ext4_ialloc.h
+++ b/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
--- a/lwext4/ext4_inode.c
+++ b/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
--- a/lwext4/ext4_inode.h
+++ b/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.
--- a/lwext4/ext4_super.c
+++ b/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)
{
--- a/lwext4/ext4_super.h
+++ b/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
--- a/lwext4/ext4_types.h
+++ b/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>