return (0); /* nothing to do. ? */
}
-#ifdef AFS_FBSD53_ENV
-int
-afs_mount(struct mount *mp, struct thread *td)
-{
- int afs_omount(struct mount *mp, char *path, caddr_t data, struct thread *p);
-
- return afs_omount(mp, NULL, NULL, td);
-}
-#endif
-
int
#ifdef AFS_FBSD53_ENV
afs_omount(struct mount *mp, char *path, caddr_t data, struct thread *p)
vfs_getnewfsid(mp);
mp->mnt_stat.f_iosize = 8192;
- if (path)
- (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
+ if (path != NULL)
+ copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
+ else
+ bcopy("/afs", mp->mnt_stat.f_mntonname, size = 4);
memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
memset(mp->mnt_stat.f_mntfromname, 0, MNAMELEN);
strcpy(mp->mnt_stat.f_mntfromname, "AFS");
/* null terminated string "AFS" will fit, just leave it be. */
strcpy(mp->mnt_stat.f_fstypename, "afs");
AFS_GUNLOCK();
- (void)afs_statfs(mp, &mp->mnt_stat, p);
+ afs_statfs(mp, &mp->mnt_stat, p);
return 0;
}
+#ifdef AFS_FBSD53_ENV
+int
+afs_mount(struct mount *mp, struct thread *td)
+{
+ return afs_omount(mp, NULL, NULL, td);
+}
+#endif
+
#ifdef AFS_FBSD60_ENV
static int
afs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td)
if (AFSTOV(vc) != ap->a_vp)
panic("AFS open changed vnode!");
#endif
+ AFS_GUNLOCK();
#ifdef AFS_FBSD60_ENV
vnode_create_vobject(ap->a_vp, vc->m.Length, ap->a_td);
#endif
osi_FlushPages(vc, ap->a_cred);
- AFS_GUNLOCK();
return error;
}
*/
if (code)
printf("afs_vop_reclaim: afs_FlushVCache failed code %d\n", code);
-
#ifdef AFS_FBSD60_ENV
- vnode_destroy_vobject(vp);
+ else
+ vnode_destroy_vobject(vp);
#endif
return 0;
}
if (afsd_verbose)
printf("%s: Mounting the AFS root on '%s', flags: %d.\n", rn,
cacheMountDir, mountFlags);
-#ifdef AFS_FBSD_ENV
+#if defined(AFS_FBSD60_ENV)
+ /* data must be non-NULL but is otherwise ignored */
+ if ((mount(MOUNT_AFS, cacheMountDir, mountFlags, rn)) < 0) {
+#elif defined(AFS_FBSD_ENV)
if ((mount("AFS", cacheMountDir, mountFlags, (caddr_t) 0)) < 0) {
#elif defined(AFS_AIX_ENV)
if (aix_vmount()) {
if ((mount("AFS", cacheMountDir, mountFlags, "afs", NULL, 0)) < 0) {
#elif defined(AFS_SGI_ENV)
mountFlags = MS_FSS;
- if ((mount(MOUNT_AFS, cacheMountDir, mountFlags, (caddr_t) MOUNT_AFS))
- < 0) {
+ if ((mount(MOUNT_AFS, cacheMountDir, mountFlags, (caddr_t) MOUNT_AFS)) < 0) {
#elif defined(AFS_LINUX20_ENV)
if ((mount("AFS", cacheMountDir, MOUNT_AFS, 0, NULL)) < 0) {
#else