aboutsummaryrefslogtreecommitdiffstats
path: root/modules/parse_hesiod.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/parse_hesiod.c')
-rw-r--r--modules/parse_hesiod.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/parse_hesiod.c b/modules/parse_hesiod.c
index 084f3a0..de1bc6f 100644
--- a/modules/parse_hesiod.c
+++ b/modules/parse_hesiod.c
@@ -25,11 +25,11 @@ int parse_version = AUTOFS_PARSE_VERSION; /* Required by protocol */
/* Break out the fields in an AFS record of the form:
"AFS /afs/athena/mit/tytso w /mit/tytso-afs" */
-static int parse_afs(char *filsysline, char *name, int name_len,
+static int parse_afs(const char *filsysline, const char *name, int name_len,
char *source, int source_len,
char *options, int options_len)
{
- char *p;
+ const char *p;
int i;
p = filsysline;
@@ -65,11 +65,11 @@ static int parse_afs(char *filsysline, char *name, int name_len,
/* Break out the fields in an NFS record of the form:
"NFS /export/src nelson.tx.ncsu.edu w /ncsu/tx-src" */
-static int parse_nfs(char *filsysline, char *name, int name_len,
+static int parse_nfs(const char *filsysline, const char *name, int name_len,
char *source, int source_len,
char *options, int options_len)
{
- char *p;
+ const char *p;
char mount[HESIOD_LEN + 1];
int i;
@@ -119,11 +119,11 @@ static int parse_nfs(char *filsysline, char *name, int name_len,
/* Break out the fields in a generic record of the form:
"UFS /dev/ra0g w /site" */
-static int parse_generic(char *filsysline, char *name, int name_len,
+static int parse_generic(const char *filsysline, const char *name, int name_len,
char *source, int source_len,
char *options, int options_len)
{
- char *p;
+ const char *p;
int i;
p = filsysline;
@@ -157,7 +157,7 @@ static int parse_generic(char *filsysline, char *name, int name_len,
return 0;
}
-int parse_init(int argc, char **argv, void **context)
+int parse_init(int argc, const char * const *argv, void **context)
{
return 0;
}
@@ -167,12 +167,14 @@ int parse_done(void *context)
return 0;
}
-int parse_mount(char *root, char *name, int name_len, char *mapent, void *context)
+int parse_mount(const char *root, const char *name,
+ int name_len, const char *mapent, void *context)
{
char source[HESIOD_LEN+1],
fstype[HESIOD_LEN+1],
options[HESIOD_LEN+1],
- *p, *q;
+ *q;
+ const char *p;
p = mapent;
q = fstype;