uss: Tidy up header includes
[openafs.git] / src / uss / uss_fs.c
index 4273b5f..77cdb2b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID
-    ("$Header$");
+#include <roken.h>
 
-#include "uss_fs.h"            /*Interface to this module */
-#include <sys/types.h>
-#include <errno.h>
-#include <sys/socket.h>
 #ifdef AFS_SUN5_ENV
 #include <sys/ioccom.h>
 #endif
-#include <netinet/in.h>
-
-#include <string.h>
-#include <unistd.h>
 
 #include <afs/venus.h>
 #include <rx/rx.h>
 #include <afs/sys_prototypes.h>
-#include "uss_common.h"
 
+#include "uss_common.h"
+#include "uss_fs.h"            /*Interface to this module */
 
 /*
  * ---------------------- Private definitions ---------------------
@@ -73,9 +65,9 @@ static struct ViceIoctl *blobP = &blob;       /*Ptr to above */
  *------------------------------------------------------------------------*/
 
 static int
-InAFS(register char *a_path)
+InAFS(char *a_path)
 {                              /*InAFS */
-    register afs_int32 code;
+    afs_int32 code;
 
     blob.in = NULL;
     blob.in_size = 0;
@@ -103,7 +95,7 @@ InAFS(register char *a_path)
  *     char *a_path         : Pathname to ancestorize.
  *     char *a_parentBuff   : Ptr to parent buffer to use.
  *     char **a_componentPP : Ptr to the final component.
- *     
+ *
  *
  * Returns:
  *     Ptr to the buffer containing the parent dir name.
@@ -173,7 +165,7 @@ CarefulPioctl(char *a_path, int a_opcode, struct ViceIoctl *a_blobP, int a_sl)
 #ifdef USS_FS_DB
     static char rn[] = "uss_fs:CarefulPioctl";
 #endif
-    register afs_int32 code;
+    afs_int32 code;
 
     /*
      * Call the pioctl() the first time, return if things worked
@@ -220,7 +212,7 @@ uss_fs_GetACL(char *a_dirPath, char *a_aclBuff, afs_int32 a_aclBuffBytes)
 #ifdef USS_FS_DB
     static char rn[] = "uss_fs_GetACL";        /*Routine name */
 #endif
-    register afs_int32 code;   /*pioctl() result */
+    afs_int32 code;    /*pioctl() result */
 
     blob.in = NULL;
     blob.in_size = 0;
@@ -260,7 +252,7 @@ uss_fs_SetACL(char *a_dirPath, char *a_aclBuff, afs_int32 a_aclBuffBytes)
 #ifdef USS_FS_DB
     static char rn[] = "uss_fs_SetACL";        /*Routine name */
 #endif
-    register afs_int32 code;   /*pioctl() result */
+    afs_int32 code;    /*pioctl() result */
 
     blob.in = a_aclBuff;
     blob.in_size = a_aclBuffBytes;
@@ -302,7 +294,7 @@ uss_fs_GetVolStat(char *a_mountpoint, char *a_volStatBuff,
 #ifdef USS_FS_DB
     static char rn[] = "uss_fs_GetVolStat";    /*Routine name */
 #endif
-    register afs_int32 code;   /*pioctl() result */
+    afs_int32 code;    /*pioctl() result */
 
     blob.in = NULL;
     blob.in_size = 0;
@@ -337,13 +329,13 @@ uss_fs_GetVolStat(char *a_mountpoint, char *a_volStatBuff,
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_SetVolStat(char *a_mountpoint, char *a_volStatBuff, 
+uss_fs_SetVolStat(char *a_mountpoint, char *a_volStatBuff,
                  afs_int32 a_volStatBuffBytes)
 {                              /*uss_fs_SetVolStat */
 #ifdef USS_FS_DB
     static char rn[] = "uss_fs_SetVolStat";    /*Routine name */
 #endif
-    register afs_int32 code;   /*pioctl() result */
+    afs_int32 code;    /*pioctl() result */
 
     blob.in = a_volStatBuff;
     blob.in_size = a_volStatBuffBytes;
@@ -383,7 +375,7 @@ uss_fs_CkBackups(void)
 #ifdef USS_FS_DB
     static char rn[] = "uss_fs_CkBackups";     /*Routine name */
 #endif
-    register afs_int32 code;   /*pioctl() result */
+    afs_int32 code;    /*pioctl() result */
 
     blob.in = NULL;
     blob.in_size = 0;
@@ -425,7 +417,7 @@ uss_fs_MkMountPoint(char *a_volname, char *a_cellname, afs_int32 a_rw,
 {                              /*uss_fs_MkMountPoint */
     extern int local_Cell;
     static char rn[] = "uss_fs_MkMountPoint";  /*Routine name */
-    register afs_int32 code;   /*pioctl() result */
+    afs_int32 code;    /*pioctl() result */
     char *tp;                  /*Temporary */
 
 #ifdef USS_FS_DB
@@ -483,7 +475,7 @@ afs_int32
 uss_fs_RmMountPoint(char *a_mountpoint)
 {                              /*uss_fs_RmMountPoint */
     static char rn[] = "uss_fs_RmMountPoint";  /*Routine name */
-    register afs_int32 code;   /*pioctl() result */
+    afs_int32 code;    /*pioctl() result */
     char *parentDirP;          /*Ptr to parent */
     char *componentP;          /*Ptr to last component */
 
@@ -550,14 +542,14 @@ struct tokenInfo {
 };
 
 /*
- * Build a list of tokens, delete the bad ones (the ones to remove from the 
+ * Build a list of tokens, delete the bad ones (the ones to remove from the
  * permissions list,) destroy all tokens, and then re-register the good ones.
  * Ugly, but it works.
  */
 int
 uss_fs_UnlogToken(char *celln)
 {
-    unsigned int count = 0, index, index2;
+    int count = 0, index, index2;
     afs_int32 code = 0, cnt = 0;
     struct ktc_principal serviceName;
     struct tokenInfo *tokenInfoP, *tp;