Make sure we use rstat's protocol's values of FSCALE. We were picking up
authorJ.T. Conklin <jtc@FreeBSD.org>
Thu, 23 Sep 1993 18:48:55 +0000 (18:48 +0000)
committerJ.T. Conklin <jtc@FreeBSD.org>
Thu, 23 Sep 1993 18:48:55 +0000 (18:48 +0000)
the FSCALE from sys/param.h which caused our load averages to be sent
incorrectly to remote machines.

libexec/rpc.rstatd/rstat_proc.c

index bbb6407..5eda69f 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef lint
 /*static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";*/
 /*static char sccsid[] = "from: @(#)rstat_proc.c       2.2 88/08/01 4.0 RPCSRC";*/
 #ifndef lint
 /*static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";*/
 /*static char sccsid[] = "from: @(#)rstat_proc.c       2.2 88/08/01 4.0 RPCSRC";*/
-static char rcsid[] = "$Id: rstat_proc.c,v 1.3 1993/08/01 18:29:47 mycroft Exp $";
+static char rcsid[] = "$Id: rstat_proc.c,v 1.4 1993/09/23 18:42:39 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -38,8 +38,10 @@ static char rcsid[] = "$Id: rstat_proc.c,v 1.3 1993/08/01 18:29:47 mycroft Exp $
  * Copyright (c) 1984 by Sun Microsystems, Inc.
  */
 
  * Copyright (c) 1984 by Sun Microsystems, Inc.
  */
 
-#include <signal.h>
 #include <stdio.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
 #include <rpc/rpc.h>
 #include <sys/socket.h>
 #include <nlist.h>
 #include <rpc/rpc.h>
 #include <sys/socket.h>
 #include <nlist.h>
@@ -53,6 +55,9 @@ static char rcsid[] = "$Id: rstat_proc.c,v 1.3 1993/08/01 18:29:47 mycroft Exp $
 #include <sys/dk.h>
 #endif
 #include <net/if.h>
 #include <sys/dk.h>
 #endif
 #include <net/if.h>
+
+#undef FSHIFT                   /* Use protocol's shift and scale values */
+#undef FSCALE
 #include <rpcsvc/rstat.h>
 
 struct nlist nl[] = {
 #include <rpcsvc/rstat.h>
 
 struct nlist nl[] = {