Further fallout from making 'path' arg to 'ufs_open' 'constchar *'.

There may be fallout in other builds....
This commit is contained in:
dsl 2003-08-18 15:47:41 +00:00
parent 8453fb0040
commit fc94061686
3 changed files with 17 additions and 26 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dosfile.c,v 1.7 2003/02/01 14:48:18 dsl Exp $ */
/* $NetBSD: dosfile.c,v 1.8 2003/08/18 15:47:41 dsl Exp $ */
/*
* Copyright (c) 1996
@ -43,7 +43,7 @@
#include "diskbuf.h"
#include "dosfile.h"
extern int dosopen __P((char *));
extern int dosopen __P((const char *));
extern void dosclose __P((int));
extern int dosread __P((int, char *, int));
extern int dosseek __P((int, int, int));
@ -80,7 +80,7 @@ dos2errno()
int
dos_open(path, f)
char *path;
const char *path;
struct open_file *f;
{
struct dosfile *df;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dosfile.h,v 1.1.1.1 1997/03/14 02:40:32 perry Exp $ */
/* $NetBSD: dosfile.h,v 1.2 2003/08/18 15:47:41 dsl Exp $ */
/*
* Copyright (c) 1996
@ -32,12 +32,4 @@
*
*/
int dos_open __P((char *path, struct open_file *f));
int dos_read __P((struct open_file *f,void *addr,
size_t size, size_t *resid));
int dos_close __P((struct open_file *f));
int dos_write __P((struct open_file *f,void *addr,
size_t size, size_t *resid));
int dos_stat __P((struct open_file *f, struct stat *sb));
off_t dos_seek __P((struct open_file *f, off_t offset, int where));
FS_DEF(dos);

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs.c,v 1.6 2003/03/19 17:27:43 drochner Exp $ */
/* $NetBSD: nfs.c,v 1.7 2003/08/18 15:47:43 dsl Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@ -101,7 +101,8 @@ struct nfs_iodesc {
};
int nfs_getrootfh __P((struct iodesc *, char *, u_char *));
int nfs_lookupfh __P((struct nfs_iodesc *, char *, struct nfs_iodesc *));
int nfs_lookupfh __P((struct nfs_iodesc *, const char *, int,
struct nfs_iodesc *));
#ifndef NFS_NOSYMLINK
int nfs_readlink __P((struct nfs_iodesc *, char *));
#endif
@ -171,12 +172,13 @@ nfs_getrootfh(d, path, fhp)
* Return zero or error number.
*/
int
nfs_lookupfh(d, name, newfd)
nfs_lookupfh(d, name, len, newfd)
struct nfs_iodesc *d;
char *name;
const char *name;
int len;
struct nfs_iodesc *newfd;
{
int len, rlen;
int rlen;
struct args {
u_char fh[NFS_FHSIZE];
n_long len;
@ -207,7 +209,6 @@ nfs_lookupfh(d, name, newfd)
memset(args, 0, sizeof(*args));
memcpy(args->fh, d->fh, sizeof(args->fh));
len = strlen(name);
if (len > sizeof(args->name))
len = sizeof(args->name);
memcpy(args->name, name, len);
@ -347,17 +348,17 @@ nfs_readdata(d, off, addr, len)
*/
int
nfs_open(path, f)
char *path;
const char *path;
struct open_file *f;
{
static struct nfs_iodesc nfs_root_node;
struct iodesc *desc;
struct nfs_iodesc *currfd;
char *cp;
const char *cp;
#ifndef NFS_NOSYMLINK
struct nfs_iodesc *newfd;
struct nfsv2_fattrs *fa;
char *ncp;
const char *ncp;
int c;
char namebuf[NFS_MAXPATHLEN + 1];
char linkbuf[NFS_MAXPATHLEN + 1];
@ -431,12 +432,10 @@ nfs_open(path, f)
}
cp++;
}
*cp = '\0';
}
/* lookup a file handle */
error = nfs_lookupfh(currfd, ncp, newfd);
*cp = c;
error = nfs_lookupfh(currfd, ncp, cp - ncp, newfd);
if (error)
goto out;
@ -505,7 +504,7 @@ out:
/* XXX: Check for empty path here? */
error = nfs_lookupfh(&nfs_root_node, cp, currfd);
error = nfs_lookupfh(&nfs_root_node, cp, strlen(cp), currfd);
#endif
if (!error) {
f->f_fsdata = (void *)currfd;