summaryrefslogtreecommitdiff
path: root/isofs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-11-21 04:28:48 +0000
committerRoland McGrath <roland@gnu.org>1999-11-21 04:28:48 +0000
commit16b4e5aa5c17ca39c5a1be22c5ac4b612c323ccb (patch)
treef695a73fed447c951372e7c22dc9032dadc9a555 /isofs
parentd4139b9468005e145ba4c9fffa90b212de05e7d5 (diff)
1999-11-20 Roland McGrath <roland@baalperazim.frob.com>
* lookup.c (dirscanblock): Add const to type of NAME parameter. (isonamematch): Likewise. * rr.c (rrip_match_lookup): Likewise. (rrip_work): Likewise. Change char -> size_t for MATCH_NAMELEN. * rr.h: Update decls.
Diffstat (limited to 'isofs')
-rw-r--r--isofs/lookup.c9
-rw-r--r--isofs/rr.c4
-rw-r--r--isofs/rr.h21
3 files changed, 18 insertions, 16 deletions
diff --git a/isofs/lookup.c b/isofs/lookup.c
index 2e3465b9..6c259769 100644
--- a/isofs/lookup.c
+++ b/isofs/lookup.c
@@ -23,11 +23,12 @@
#include "isofs.h"
/* Forward */
-static error_t
-dirscanblock (void *, char *, size_t, struct dirrect **, struct rrip_lookup *);
+static error_t dirscanblock (void *, const char *, size_t,
+ struct dirrect **, struct rrip_lookup *);
static int
-isonamematch (char *dirname, size_t dnamelen, char *username, size_t unamelen)
+isonamematch (const char *dirname, size_t dnamelen,
+ const char *username, size_t unamelen)
{
/* Special representations for `.' and `..' */
if (dnamelen == 1 && dirname[0] == '\0')
@@ -148,7 +149,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
/* Scan one logical sector of directory contents (at address BLKADDR)
for NAME of length NAMELEN. Return its address in *RECORD. */
static error_t
-dirscanblock (void *blkaddr, char *name, size_t namelen,
+dirscanblock (void *blkaddr, const char *name, size_t namelen,
struct dirrect **record, struct rrip_lookup *rr)
{
struct dirrect *entry;
diff --git a/isofs/rr.c b/isofs/rr.c
index cdb7a792..20fea897 100644
--- a/isofs/rr.c
+++ b/isofs/rr.c
@@ -47,7 +47,7 @@ release_rrip (struct rrip_lookup *rr)
/* Work function combining the three interfaces below. */
static int
rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
- char *match_name, char match_name_len,
+ const char *match_name, size_t match_name_len,
int initializing, int ignorenm)
{
void *bp, *terminus;
@@ -616,7 +616,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
case, fill RR with information corresponding to the fields we do
encounter. */
int
-rrip_match_lookup (struct dirrect *dr, char *name, size_t namelen,
+rrip_match_lookup (struct dirrect *dr, const char *name, size_t namelen,
struct rrip_lookup *rr)
{
return rrip_work (dr, rr, name, namelen, 0, 0);
diff --git a/isofs/rr.h b/isofs/rr.h
index b7a3c40d..ab80e4bd 100644
--- a/isofs/rr.h
+++ b/isofs/rr.h
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1997 Free Software Foundation, Inc.
+/*
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
Written by Thomas Bushnell, n/BSG.
This file is part of the GNU Hurd.
@@ -31,16 +31,16 @@ struct rrip_lookup
/* PN */
dev_t rdev;
-
+
/* SL */
char *target;
-
+
/* NM */
char *name; /* name of this entry if changed (malloced) */
-
+
/* CL */
off_t newloc; /* relocated directory */
-
+
/* PL */
off_t parloc; /* parent of relocated directory */
@@ -60,10 +60,10 @@ struct rrip_lookup
/* TR */
size_t translen;
char *trans;
-
+
/* MD */
mode_t allmode;
-
+
/* FL */
long flags;
@@ -198,7 +198,7 @@ struct rr_pl
};
/* The body of a TF (Time Stamp) field. */
-struct rr_tf
+struct rr_tf
{
u_char flags;
char data[0];
@@ -259,7 +259,8 @@ struct gn_fl
/* Rock-Ridge related functions. */
-int rrip_match_lookup (struct dirrect *, char *, size_t, struct rrip_lookup *);
+int rrip_match_lookup (struct dirrect *, const char *,
+ size_t, struct rrip_lookup *);
void rrip_lookup (struct dirrect *, struct rrip_lookup *, int);
void rrip_initialize (struct dirrect *);
void release_rrip (struct rrip_lookup *);