afsd: Remove unused definitions
[openafs.git] / src / afsd / afsd.c
index 712318f..4c9cdd7 100644 (file)
@@ -68,8 +68,7 @@
 
 #include "afsd.h"
 
-#include <assert.h>
-#include <potpourri.h>
+#include <afs/afs_assert.h>
 #include <afs/afsutil.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -229,11 +228,6 @@ struct in_addr_42 {
        } S_un_w;
        afs_uint32 S_addr;
     } S_un;
-#define        s_host  S_un.S_un_b.s_b2        /* host on imp */
-#define        s_net   S_un.S_un_b.s_b1        /* network */
-#define        s_imp   S_un.S_un_w.s_w2        /* imp */
-#define        s_impno S_un.S_un_b.s_b4        /* imp # */
-#define        s_lh    S_un.S_un_b.s_b3        /* logical host */
 };
 
 #define        mPrintIPAddr(ipaddr)  printf("[%d.%d.%d.%d] ",          \
@@ -270,7 +264,7 @@ static int sawBiod = 0;
 static int sawCacheStatEntries = 0;
 char afsd_cacheMountDir[1024]; /*Mount directory for AFS */
 static char rootVolume[64] = "root.afs";       /*AFS root volume name */
-static afs_int32 cacheSetTime = FALSE; /*Keep checking time to avoid drift? */
+static afs_int32 cacheSetTime = 0;     /*Keep checking time to avoid drift? */
 #ifdef AFS_XBSD_ENV
 static int createAndTrunc = O_RDWR | O_CREAT | O_TRUNC;        /*Create & truncate on open */
 #else
@@ -1726,7 +1720,7 @@ mainproc(struct cmd_syndesc *as, void *arock)
     }
     if (as->parms[8].items) {
        /* -nosettime */
-       cacheSetTime = FALSE;
+       cacheSetTime = 0;
     }
     if (as->parms[9].items) {
        /* -verbose */
@@ -1858,7 +1852,7 @@ mainproc(struct cmd_syndesc *as, void *arock)
     }
     if (as->parms[32].items) {
        /* -settime */
-       cacheSetTime = TRUE;
+       cacheSetTime = 1;
     }
 
     /* set rx_extraPackets */
@@ -1891,7 +1885,7 @@ mainproc(struct cmd_syndesc *as, void *arock)
     if (as->parms[35].items) {
 #ifdef AFS_MAXVCOUNT_ENV
        /* -disable-dynamic-vcaches */
-       afsd_dynamic_vcaches = FALSE;
+       afsd_dynamic_vcaches = 0;
 #else
        printf("afsd: Error toggling flag, dynamically allocated vcaches not supported on your platform\n");
        exit(1);
@@ -1900,7 +1894,7 @@ mainproc(struct cmd_syndesc *as, void *arock)
 #ifdef AFS_MAXVCOUNT_ENV
     else {
        /* -dynamic-vcaches */
-       afsd_dynamic_vcaches = TRUE;
+       afsd_dynamic_vcaches = 1;
     }
 
     if (afsd_verbose)
@@ -1932,7 +1926,7 @@ afsd_run(void)
     int vFilesFound;           /*How many data cache files were found in sweep */
     int currVFile;             /*Current AFS cache file number passed in */
 
-    /*
+       /*
      * Pull out all the configuration info for the workstation's AFS cache and
      * the cellular community we're willing to let our users see.
      */
@@ -2170,7 +2164,7 @@ afsd_run(void)
        if (code > 0) {
            if (enable_rxbind)
                code = code | 0x80000000;
-           afsd_call_syscall(AFSOP_ADVISEADDR, code, addrbuf, maskbuf, mtubuf);
+               afsd_call_syscall(AFSOP_ADVISEADDR, code, addrbuf, maskbuf, mtubuf);
        } else
            printf("ADVISEADDR: Error in specifying interface addresses:%s\n",
                   reason);
@@ -2222,7 +2216,6 @@ afsd_run(void)
            printf("%s: Forking AFSDB lookup handler.\n", rn);
        afsd_fork(0, afsdb_thread, NULL);
     }
-
     code = afsd_call_syscall(AFSOP_BASIC_INIT, 1);
     if (code) {
        printf("%s: Error %d in basic initialization.\n", rn, code);
@@ -2247,7 +2240,7 @@ afsd_run(void)
     cparams.setTimeFlag = cacheSetTime;
     cparams.memCacheFlag = cacheFlags;
     cparams.dynamic_vcaches = afsd_dynamic_vcaches;
-    afsd_call_syscall(AFSOP_CACHEINIT, &cparams);
+       afsd_call_syscall(AFSOP_CACHEINIT, &cparams);
 
     /* do it before we init the cache inodes */
     if (enable_splitcache) {
@@ -2306,7 +2299,7 @@ afsd_run(void)
     if (afsd_debug)
        printf("%s: Calling AFSOP_CELLINFO: cell info file is '%s'\n", rn,
               fullpn_CellInfoFile);
-    afsd_call_syscall(AFSOP_CELLINFO, fullpn_CellInfoFile);
+       afsd_call_syscall(AFSOP_CELLINFO, fullpn_CellInfoFile);
 
     if (rxmaxmtu) {
        if (afsd_verbose)
@@ -2455,7 +2448,7 @@ afsd_run(void)
     if (afsd_debug)
        printf("%s: Calling AFSOP_GO with cacheSetTime = %d\n", rn,
               cacheSetTime);
-    afsd_call_syscall(AFSOP_GO, cacheSetTime);
+       afsd_call_syscall(AFSOP_GO, cacheSetTime);
 
     /*
      * At this point, we have finished passing the kernel all the info