]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/statd/statd.c
rpc.statd: Stop overloading sockfd in utils/statd/rmtcall.c
[nfs-utils.git] / utils / statd / statd.c
index 8337b64b993918fb8704daeb49cae711447779d3..321f7a945a81533da91ff8e1a8bc7b317c1e349f 100644 (file)
@@ -75,7 +75,6 @@ static struct option longopts[] =
 };
 
 extern void sm_prog_1 (struct svc_req *, register SVCXPRT *);
-extern int statd_get_socket(void);
 static void load_state_number(void);
 
 #ifdef SIMULATIONS
@@ -148,7 +147,7 @@ static void log_modes(void)
  * help the occasional admin. 
  */
 static void 
-usage()
+usage(void)
 {
        fprintf(stderr,"usage: %s [options]\n", name_p);
        fprintf(stderr,"      -h, -?, --help       Print this help screen.\n");
@@ -445,7 +444,7 @@ int main (int argc, char **argv)
 
        /* Child. */
 
-       log_init (name_p,version_p);
+       log_init (/*name_p,version_p*/);
 
        log_modes();
 
@@ -477,7 +476,8 @@ int main (int argc, char **argv)
                }
 
        /* Make sure we have a privilege port for calling into the kernel */
-       statd_get_socket();
+       if (statd_get_socket() < 0)
+               exit(1);
 
        /* If sm-notify didn't take all the state files, load
         * state information into our notify-list so we can