{
/* parse multihomed address files */
char reason[1024];
- st = parseNetFiles(buffer, maskbuffer, mtubuffer, MAXIPADDRS, reason,
+ st = parseNetFiles((afs_uint32*)buffer,(afs_uint32*) maskbuffer, (afs_uint32*)mtubuffer, MAXIPADDRS, reason,
AFSDIR_CLIENT_NETINFO_FILEPATH,
AFSDIR_CLIENT_NETRESTRICT_FILEPATH);
if (st > 0)
/*
* We need execute permission to search a directory
*/
- code = afs_access(vp, VEXEC, u.u_cred);
+ code = afs_access(VTOAFS(vp), VEXEC, u.u_cred);
if (code != 0) {
VN_RELE(vp);
afs_osi_Free(tmpPath, strlen(path) + 1);
struct usr_vattr attrs;
char *nameP;
+ struct vcache* vc;
+
if (uafs_IsRoot(path)) {
fileP = afs_RootVnode;
VN_HOLD(fileP);
attrs.va_size = 0;
}
fileP = NULL;
+ vc=VTOAFS(fileP);
code =
- afs_create(dirP, nameP, &attrs,
+ afs_create(VTOAFS(dirP), nameP, &attrs,
(flags & O_EXCL) ? usr_EXCL : usr_NONEXCL, mode,
- &fileP, u.u_cred);
+ &vc, u.u_cred);
VN_RELE(dirP);
if (code != 0) {
errno = code;
}
if (!fileMode)
fileMode = VREAD; /* since O_RDONLY is 0 */
- code = afs_access(fileP, fileMode, u.u_cred);
+ code = afs_access(VTOAFS(fileP), fileMode, u.u_cred);
if (code != 0) {
VN_RELE(fileP);
errno = code;
/*
* Get the file attributes, all we need is the size
*/
- code = afs_getattr(fileP, &attrs, u.u_cred);
+ code = afs_getattr(VTOAFS(fileP), &attrs, u.u_cred);
if (code != 0) {
VN_RELE(fileP);
errno = code;
if ((flags & O_TRUNC) && (attrs.va_size != 0)) {
usr_vattr_null(&attrs);
attrs.va_size = 0;
- code = afs_setattr(fileP, &attrs, u.u_cred);
+ code = afs_setattr(VTOAFS(fileP), &attrs, u.u_cred);
if (code != 0) {
VN_RELE(fileP);
errno = code;
}
}
+ vc=VTOAFS(fileP);
/*
* do the open
*/
- code = afs_open(&fileP, openFlags, u.u_cred);
+ code = afs_open(&vc, openFlags, u.u_cred);
if (code != 0) {
VN_RELE(fileP);
errno = code;
* do the write
*/
- code = afs_write(fileP, &uio, afs_FileFlags[fd], u.u_cred, 0);
+ code = afs_write(VTOAFS(fileP), &uio, afs_FileFlags[fd], u.u_cred, 0);
if (code) {
errno = code;
return -1;
/*
* do the read
*/
- code = afs_read(fileP, &uio, u.u_cred, 0, &bufP, 0);
+ code = afs_read(VTOAFS(fileP), &uio, u.u_cred, 0, &bufP, 0);
if (code) {
errno = code;
return -1;
/*
* Get the attributes
*/
- code = afs_getattr(vp, &attrs, u.u_cred);
+ code = afs_getattr(VTOAFS(vp), &attrs, u.u_cred);
if (code != 0) {
return code;
}
}
usr_vattr_null(&attrs);
attrs.va_mode = mode;
- code = afs_setattr(vp, &attrs, u.u_cred);
+ code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
VN_RELE(vp);
if (code != 0) {
errno = code;
}
usr_vattr_null(&attrs);
attrs.va_mode = mode;
- code = afs_setattr(vp, &attrs, u.u_cred);
+ code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
if (code != 0) {
errno = code;
return -1;
}
usr_vattr_null(&attrs);
attrs.va_size = length;
- code = afs_setattr(vp, &attrs, u.u_cred);
+ code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
VN_RELE(vp);
if (code != 0) {
errno = code;
}
usr_vattr_null(&attrs);
attrs.va_size = length;
- code = afs_setattr(vp, &attrs, u.u_cred);
+ code = afs_setattr(VTOAFS(vp), &attrs, u.u_cred);
if (code != 0) {
errno = code;
return -1;
newpos = offset;
break;
case SEEK_END:
- code = afs_getattr(vp, &attrs, u.u_cred);
+ code = afs_getattr(VTOAFS(vp), &attrs, u.u_cred);
if (code != 0) {
errno = code;
return -1;