ref: 70fba6d9da86b271f1daab425d2a27ac6396c595
parent: d85decabcf3923cdb2f08a5c9f8522ec5e0c394a
author: gkostka <kostka.grzegorz@gmail.com>
date: Sun Jun 28 04:42:00 EDT 2015
Add const keyword in ext4_dir_entry_next return value
--- a/demos/chibios/common/test_lwext4.c
+++ b/demos/chibios/common/test_lwext4.c
@@ -89,7 +89,7 @@
{
char sss[255];
ext4_dir d;
- ext4_direntry *de;
+ const ext4_direntry *de;
printf("ls %s\n", path);
--- a/demos/generic/main.c
+++ b/demos/generic/main.c
@@ -131,7 +131,7 @@
{
char sss[255];
ext4_dir d;
- ext4_direntry *de;
+ const ext4_direntry *de;
printf("ls %s:\n", path);
--- a/demos/stm32f429_disco/main.c
+++ b/demos/stm32f429_disco/main.c
@@ -113,7 +113,7 @@
{
char sss[255];
ext4_dir d;
- ext4_direntry *de;
+ const ext4_direntry *de;
printf("ls %s\n", path);
--- a/fs_test/lwext4_server.c
+++ b/fs_test/lwext4_server.c
@@ -808,7 +808,7 @@
}
int idx = 0;
- ext4_direntry *d;
+ const ext4_direntry *d;
while ((d = ext4_dir_entry_next(&dir_tab[did].fd)) != NULL) {
--- a/lwext4/ext4.c
+++ b/lwext4/ext4.c
@@ -948,8 +948,8 @@
struct ext4_inode_ref ref;
const uint8_t *u8_buf = buf;
int r;
- ;
+
ext4_assert(f && f->mp);
if (f->flags & O_RDONLY)
@@ -1365,7 +1365,7 @@
int ext4_dir_close(ext4_dir *d) { return ext4_fclose(&d->f); }
-ext4_direntry *ext4_dir_entry_next(ext4_dir *d)
+const ext4_direntry *ext4_dir_entry_next(ext4_dir *d)
{
#define EXT4_DIR_ENTRY_OFFSET_TERM (uint64_t)(-1)
--- a/lwext4/ext4.h
+++ b/lwext4/ext4.h
@@ -342,7 +342,7 @@
* @param d directory handle
* @param id entry id
* @return directory entry id (NULL if no entry)*/
-ext4_direntry *ext4_dir_entry_next(ext4_dir *d);
+const ext4_direntry *ext4_dir_entry_next(ext4_dir *d);
#endif /* EXT4_H_ */