shithub: lwext4

Download patch

ref: 587e7d2d67a3a9955a8f0a647c310b20fdd75841
parent: cc3d7c64e84942f8fff1141660051a35937c385e
author: gkostka <kostka.grzegorz@gmail.com>
date: Mon Oct 7 16:17:46 EDT 2013

File format.

--- a/src/ext4.h
+++ b/src/ext4.h
@@ -102,7 +102,7 @@
 /********************************FILE DESCRIPTOR********************************/
 
 /**@brief	File descriptor*/
-typedef struct	ext4_file {
+typedef struct ext4_file {
 
 	/**@brief	Pountpoint handle.*/
 	struct ext4_mountpoint *mp;
@@ -152,18 +152,19 @@
 	ext4_direntry	de;
 }ext4_dir;
 
-/********************************MOUNT OPERATIONS*******************************/
+/********************************MOUNT OPERATIONS*****************************/
 
 /**@brief	Register a block device to a name.
  * 			@warning Block device has to be filled by
  * 			@ref EXT4_BLOCKDEV_STATIC_INSTANCE. Block cache may be created
- * 			@ref EXT4_BCACHE_STATIC_INSTANCE. But block cache may by created automaticly when
- * 			bc parameter is 0.
+ * 			@ref EXT4_BCACHE_STATIC_INSTANCE.
+ * 			Block cache may by created automaticly when bc parameter is 0.
  * @param	bd block device
  * @param	bd block device cache (0 = automatic cache mode)
  * @param	dev_name register name
  * @param	standard error code*/
-int			ext4_device_register(struct ext4_blockdev *bd, struct ext4_bcache *bc, const char *dev_name);
+int	ext4_device_register(struct ext4_blockdev *bd, struct ext4_bcache *bc,
+                         const char *dev_name);
 
 /**@brief	Mount a block device with EXT4 partition to the mountpoint.
  * @param	dev_name block device name (@ref ext4_device_register)
@@ -172,72 +173,72 @@
  * 			-	/my_second_partition
  *
  * @return standard error code */
-int			ext4_mount(const char * dev_name,  char *mount_point);
+int	ext4_mount(const char * dev_name,  char *mount_point);
 
 /**@brief	Umount operation.
  * @param	mount_point mount name
  * @return  standard error code */
-int			ext4_umount(char *mount_point);
+int	ext4_umount(char *mount_point);
 
-/********************************FILE OPERATIONS********************************/
+/********************************FILE OPERATIONS******************************/
 
 /**@brief	*/
-int			ext4_fremove(const char *path);
+int	ext4_fremove(const char *path);
 
 /**@brief	File open function.
  * @param	filename, (has to start from mountpoint)
  * 			/my_partition/my_file
  * @param	flags open file flags
- *				|---------------------------------------------------------------|
- *				| 	r or rb 				O_RDONLY							|
- *				|---------------------------------------------------------------|
- *				|	w or wb 				O_WRONLY|O_CREAT|O_TRUNC			|
- *				|---------------------------------------------------------------|
- *				|	a or ab 		 		O_WRONLY|O_CREAT|O_APPEND			|
- *				|---------------------------------------------------------------|
- *				|	r+ or rb+ or r+b 		O_RDWR								|
- *				|---------------------------------------------------------------|
- *				|	w+ or wb+ or w+b 		O_RDWR|O_CREAT|O_TRUNC				|
- *				|---------------------------------------------------------------|
- *				|	a+ or ab+ or a+b 		O_RDWR|O_CREAT|O_APPEND				|
- *				|---------------------------------------------------------------|
+ *	|---------------------------------------------------------------|
+ *	| 	r or rb                 O_RDONLY                            |
+ *	|---------------------------------------------------------------|
+ *	|	w or wb                 O_WRONLY|O_CREAT|O_TRUNC            |
+ *	|---------------------------------------------------------------|
+ *	|	a or ab                 O_WRONLY|O_CREAT|O_APPEND           |
+ *	|---------------------------------------------------------------|
+ *	|	r+ or rb+ or r+b        O_RDWR                              |
+ *	|---------------------------------------------------------------|
+ *	|	w+ or wb+ or w+b 		O_RDWR|O_CREAT|O_TRUNC              |
+ *	|---------------------------------------------------------------|
+ *	|	a+ or ab+ or a+b 		O_RDWR|O_CREAT|O_APPEND	            |
+ *	|---------------------------------------------------------------|
  *
  * @return	standard error code*/
-int			ext4_fopen (ext4_file *f, const char *path, const char *flags);
+int	ext4_fopen (ext4_file *f, const char *path, const char *flags);
 
 /**@brief	*/
-int			ext4_fclose(ext4_file *f);
+int	ext4_fclose(ext4_file *f);
 
 /**@brief	*/
-int			ext4_fread (ext4_file *f, void *buf, uint32_t size, uint32_t *rcnt);
+int	ext4_fread (ext4_file *f, void *buf, uint32_t size, uint32_t *rcnt);
 
 /**@brief	*/
-int			ext4_fwrite(ext4_file *f, void *buf, uint32_t size, uint32_t *wcnt);
+int	ext4_fwrite(ext4_file *f, void *buf, uint32_t size, uint32_t *wcnt);
 
 /**@brief	*/
-int 		ext4_fseek (ext4_file *f, uint64_t offset, uint32_t origin);
+int	ext4_fseek (ext4_file *f, uint64_t offset, uint32_t origin);
 
 /**@brief	*/
-uint64_t	ext4_ftell (ext4_file *f);
+uint64_t ext4_ftell (ext4_file *f);
 
 /**@brief	*/
-uint64_t	ext4_fsize (ext4_file *f);
+uint64_t ext4_fsize (ext4_file *f);
 
-/*********************************DIRECTORY OPERATION***************************/
+/*********************************DIRECTORY OPERATION*************************/
 /**@brief	*/
-int			ext4_mkdir(const char *path);
+int	ext4_mkdir(const char *path);
 
 /**@brief	*/
-int			ext4_rmdir(const char *path);
+int	ext4_rmdir(const char *path);
 
 /**@brief	*/
-int			ext4_dir_open (ext4_dir *d, const char *path);
+int	ext4_dir_open (ext4_dir *d, const char *path);
 
 /**@brief	*/
-int			ext4_dir_close(ext4_dir *d);
+int	ext4_dir_close(ext4_dir *d);
 
 /**@brief	*/
-ext4_direntry*	ext4_entry_get(ext4_dir *d, uint32_t id);
+ext4_direntry* ext4_entry_get(ext4_dir *d, uint32_t id);
 
 #endif /* EXT4_H_ */