solaris-make-df-in-cwd-return-useful-output-20010524
[openafs.git] / src / afs / SOLARIS / osi_vfsops.c
index 6d3dc51..032d50e 100644 (file)
@@ -1,8 +1,12 @@
-/* Copyright (C) 1995, 1998 Transarc Corporation - All rights reserved. */
 /*
- * (C) COPYRIGHT IBM CORPORATION 1987, 1988
- * LICENSED MATERIALS - PROPERTY OF IBM
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
  */
+
 /*
  * osi_vfsops.c for SOLARIS
  */
@@ -45,12 +49,17 @@ int afs_mount(struct vfs *afsp, struct vnode *amvp, struct mounta *uap,
     afsp->vfs_bsize = 8192;
     afsp->vfs_fsid.val[0] = AFS_VFSMAGIC; /* magic */
     afsp->vfs_fsid.val[1] = AFS_VFSFSID; 
+    afsp->vfs_dev = AFS_VFSMAGIC;
 
     AFS_GUNLOCK();
     return 0;
 }
 
+#if defined(AFS_SUN58_ENV)
+int afs_unmount (struct vfs *afsp, int flag, struct AFS_UCRED *credp)
+#else
 int afs_unmount (struct vfs *afsp, struct AFS_UCRED *credp)
+#endif
 {
     AFS_GLOCK();
     AFS_STATCNT(afs_unmount);
@@ -213,17 +222,20 @@ struct vfsops Afs_vfsops = {
     afs_sync,
     afs_vget,
     afs_mountroot,
-    afs_swapvp
+    afs_swapvp,
+#if defined(AFS_SUN58_ENV)
+    fs_freevfs,
+#endif
 };
 
 
 /*
  * afsinit - intialize VFS
  */
-void (*ufs_iputp)();
 int (*ufs_iallocp)();
 void (*ufs_iupdatp)();
 int (*ufs_igetp)();
+void (*ufs_itimes_nolockp)();
 
 struct streamtab *udp_infop = 0;
 struct ill_s *ill_g_headp = 0;
@@ -291,14 +303,14 @@ afsinit(struct vfssw *vfsswp, int fstype)
     nfs_checkauth = (int (*)()) modlookup("nfssrv", "checkauth");
     if ( !nfs_checkauth ) afs_warn("nfs_checkauth not initialised");
 #endif
-    ufs_iputp = (int (*)()) modlookup("ufs", "ufs_iput");    
     ufs_iallocp = (int (*)()) modlookup("ufs", "ufs_ialloc");    
     ufs_iupdatp = (int (*)()) modlookup("ufs", "ufs_iupdat");
     ufs_igetp = (int (*)()) modlookup("ufs", "ufs_iget");    
+    ufs_itimes_nolockp = (void (*)()) modlookup("ufs", "ufs_itimes_nolock");
     udp_infop = (struct streamtab *) modlookup("udp", "udpinfo");    
     ill_g_headp = (struct ill_s *) modlookup("ip", "ill_g_head");    
 
-    if ( !ufs_iputp || !ufs_iallocp || !ufs_iupdatp ||
+    if ( !ufs_iallocp || !ufs_iupdatp || !ufs_itimes_nolockp ||
         !ufs_igetp || !udp_infop || !ill_g_headp )
        afs_warn("AFS to UFS mapping cannot be fully initialised\n");
 
@@ -429,7 +441,9 @@ _init()
 #else
     read_binding_file(sysbind, sb_hashtab);
 #endif
+#if !defined(AFS_SUN58_ENV)
     make_syscallname("afs", AFS_SYSCALL);
+#endif
 
     if (sysent[AFS_SYSCALL].sy_call == nosys) {
        if ((sysn = mod_getsysname(AFS_SYSCALL)) != NULL) {