aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2011-09-19 14:25:22 +0300
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-21 09:35:03 +0300
commit8210e3e981984e73dfd2d755d254fbd6897bc5e0 (patch)
tree83ae5aae2107bcd44449850452a35eba25ef1e3f
parentcbfaa5b64f8bd9844094d49f42ff7620ec71418e (diff)
jffs2reader: use const char * for path variables
This patch brings const char * type for path variables. It allows to eliminate compiler warning. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
-rw-r--r--jffs2reader.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/jffs2reader.c b/jffs2reader.c
index b995f19..033a8cb 100644
--- a/jffs2reader.c
+++ b/jffs2reader.c
@@ -106,7 +106,7 @@ int target_endian = __BYTE_ORDER;
void putblock(char *, size_t, size_t *, struct jffs2_raw_inode *);
struct dir *putdir(struct dir *, struct jffs2_raw_dirent *);
-void printdir(char *o, size_t size, struct dir *d, char *path,
+void printdir(char *o, size_t size, struct dir *d, const char *path,
int recurse);
void freedir(struct dir *);
@@ -116,12 +116,12 @@ struct jffs2_raw_dirent *resolvedirent(char *, size_t, uint32_t, uint32_t,
struct jffs2_raw_dirent *resolvename(char *, size_t, uint32_t, char *, uint8_t);
struct jffs2_raw_dirent *resolveinode(char *, size_t, uint32_t);
-struct jffs2_raw_dirent *resolvepath0(char *, size_t, uint32_t, char *,
+struct jffs2_raw_dirent *resolvepath0(char *, size_t, uint32_t, const char *,
uint32_t *, int);
-struct jffs2_raw_dirent *resolvepath(char *, size_t, uint32_t, char *,
+struct jffs2_raw_dirent *resolvepath(char *, size_t, uint32_t, const char *,
uint32_t *);
-void lsdir(char *, size_t, char *, int);
+void lsdir(char *, size_t, const char *, int);
void catfile(char *, size_t, char *, char *, size_t, size_t *);
int main(int, char **);
@@ -299,7 +299,7 @@ const char *mode_string(int mode)
d - dir struct
*/
-void printdir(char *o, size_t size, struct dir *d, char *path, int recurse)
+void printdir(char *o, size_t size, struct dir *d, const char *path, int recurse)
{
char m;
char *filetime;
@@ -678,7 +678,7 @@ struct jffs2_raw_dirent *resolveinode(char *o, size_t size, uint32_t ino)
*/
struct jffs2_raw_dirent *resolvepath0(char *o, size_t size, uint32_t ino,
- char *p, uint32_t * inos, int recc)
+ const char *p, uint32_t * inos, int recc)
{
struct jffs2_raw_dirent *dir = NULL;
@@ -794,7 +794,7 @@ struct jffs2_raw_dirent *resolvepath0(char *o, size_t size, uint32_t ino,
*/
struct jffs2_raw_dirent *resolvepath(char *o, size_t size, uint32_t ino,
- char *p, uint32_t * inos)
+ const char *p, uint32_t * inos)
{
return resolvepath0(o, size, ino, p, inos, 0);
}
@@ -807,7 +807,7 @@ struct jffs2_raw_dirent *resolvepath(char *o, size_t size, uint32_t ino,
p - path to be resolved
*/
-void lsdir(char *o, size_t size, char *path, int recurse)
+void lsdir(char *o, size_t size, const char *path, int recurse)
{
struct jffs2_raw_dirent *dd;
struct dir *d = NULL;