

Make jfsck()'s first parameter, "name", const.

Thanks to Pieter Grimmerink.



---

 cur-root/doc/libjio.3 |    2 +-
 cur-root/libjio.c     |    4 ++--
 cur-root/libjio.h     |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff -puN libjio.c~jfsck_const_name libjio.c
--- cur/libjio.c~jfsck_const_name	2004-05-05 15:08:17.000000000 -0300
+++ cur-root/libjio.c	2004-05-05 15:08:17.000000000 -0300
@@ -682,7 +682,7 @@ int jclose(struct jfs *fs)
  */
 
 /* check the journal and replay the incomplete transactions */
-int jfsck(char *name, struct jfsck_result *res)
+int jfsck(const char *name, struct jfsck_result *res)
 {
 	int fd, tfd, rv, i, maxtid;
 	char jdir[PATH_MAX], jlockfile[PATH_MAX], tname[PATH_MAX];
@@ -699,7 +699,7 @@ int jfsck(char *name, struct jfsck_resul
 		return J_ENOENT;
 
 	fs.fd = fd;
-	fs.name = name;
+	fs.name = (char *) name;
 
 	if (!get_jdir(name, jdir))
 		return J_ENOMEM;
diff -puN libjio.h~jfsck_const_name libjio.h
--- cur/libjio.h~jfsck_const_name	2004-05-05 15:08:17.000000000 -0300
+++ cur-root/libjio.h	2004-05-05 15:08:17.000000000 -0300
@@ -86,7 +86,7 @@ int jtrans_rollback(struct jtrans *ts);
 void jtrans_free(struct jtrans *ts);
 
 /* journal checker */
-int jfsck(char *name, struct jfsck_result *res);
+int jfsck(const char *name, struct jfsck_result *res);
 
 
 /* jfs constants */
diff -puN doc/libjio.3~jfsck_const_name doc/libjio.3
--- cur/doc/libjio.3~jfsck_const_name	2004-05-05 15:08:17.000000000 -0300
+++ cur-root/doc/libjio.3	2004-05-05 15:08:17.000000000 -0300
@@ -32,7 +32,7 @@ libjio - A library for Journaled I/O
 
 .BI "void jtrans_free(struct jtrans *" ts " );
 
-.BI "int jfsck(char *" name ", struct jfsck_result *" res " );
+.BI "int jfsck(const char *" name ", struct jfsck_result *" res " );
 
 .SH STRUCTURES
 .PP

_
