fsprobe: Fix usage message
[openafs.git] / src / viced / fsprobe.c
index ff2f5ee..8f19df9 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
@@ -29,7 +29,7 @@ afs_int32
 pxclient_Initialize(int auth, afs_int32 serverAddr)
 {
     afs_int32 code;
-    afs_int32 scIndex;
+    rx_securityIndex scIndex;
     struct rx_securityClass *sc;
 
     code = rx_Init(htons(2115) /*0 */ );
@@ -37,7 +37,7 @@ pxclient_Initialize(int auth, afs_int32 serverAddr)
        fprintf(stderr, "pxclient_Initialize:  Could not initialize rx.\n");
        return code;
     }
-    scIndex = 0;
+    scIndex = RX_SECIDX_NULL;
     rx_SetRxDeadTime(50);
     sc = rxnull_NewClientSecurityObject();
     serverconns[0] =
@@ -61,16 +61,15 @@ main(int argc, char **argv)
 {
     char **av = argv;
     struct sockaddr_in host;
-    register afs_int32 code;
+    afs_int32 code;
     struct hostent *hp;
-    char *hostname;
     char hnamebuf[200];
     struct timeval tv;
     int noAuth = 1;            /* Default is authenticated connections */
 
     argc--, av++;
     if (argc < 1) {
-       printf("usage: pxclient <serverHost>\n");
+       printf("usage: fsprobe <serverHost>\n");
        exit(1);
     }
     memset(&host, 0, sizeof(struct sockaddr_in));
@@ -81,13 +80,11 @@ main(int argc, char **argv)
 #endif
     if (host.sin_addr.s_addr != -1) {
        strcpy(hnamebuf, av[0]);
-       hostname = hnamebuf;
     } else {
        hp = gethostbyname(av[0]);
        if (hp) {
            host.sin_family = hp->h_addrtype;
            memcpy((caddr_t) & host.sin_addr, hp->h_addr, hp->h_length);
-           hostname = hp->h_name;
        } else {
            printf("unknown server host %s\n", av[0]);
            exit(1);
@@ -98,7 +95,7 @@ main(int argc, char **argv)
        exit(1);
     }
 
-    code = ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec, &tv.tv_usec);
+    code = RXAFS_GetTime(cstruct->conns[0], (afs_uint32 *)&tv.tv_sec, (afs_uint32 *)&tv.tv_usec);
     if (!code)
        printf("AFS_GetTime on %s sec=%ld, usec=%ld\n", av[0], tv.tv_sec,
               (long int)tv.tv_usec);
@@ -113,7 +110,7 @@ main(int argc, char **argv)
        printf("fs> ");
        if (fgets(line, 499, stdin) != NULL) {
            char *oper;
-           register char **argp = args;
+           char **argp = args;
            GetArgs(line, argp, &nargs);
            oper = &argp[0][0];
            ++argp, --nargs;
@@ -225,11 +222,11 @@ main(int argc, char **argv)
 
 
 void
-GetArgs(register char *line, register char **args, register int *nargs)
+GetArgs(char *line, char **args, int *nargs)
 {
     *nargs = 0;
     while (*line) {
-       register char *last = line;
+       char *last = line;
        while (*line == ' ')
            line++;
        if (*last == ' ')
@@ -280,10 +277,10 @@ FetchData(char **argp)
 
 
 static afs_int32
-FetchProc(register struct rx_call *acall)
+FetchProc(struct rx_call *acall)
 {
     extern char *malloc();
-    register char *tbuffer;
+    char *tbuffer;
     afs_int32 tlen, length, code;
 
     code = rx_Read(acall, &length, sizeof(afs_int32));
@@ -421,7 +418,7 @@ StoreData(char **argp)
 
 
 static afs_int32
-StoreProc(register struct rx_call *acall, char *string, int length)
+StoreProc(struct rx_call *acall, char *string, int length)
 {
     afs_int32 tlen, code;
 
@@ -839,10 +836,10 @@ Readdir(char **argp)
 
 
 static afs_int32
-FetchDir(register struct rx_call *acall)
+FetchDir(struct rx_call *acall)
 {
     extern char *malloc();
-    register char *tbuffer;
+    char *tbuffer;
     afs_int32 tlen, length, code;
     struct dirent *dp;