Whamcloud - gitweb
merge 0.5.20.3 b_devel into b_io (ready to land)
authorpschwan <pschwan>
Sun, 2 Mar 2003 05:19:27 +0000 (05:19 +0000)
committerpschwan <pschwan>
Sun, 2 Mar 2003 05:19:27 +0000 (05:19 +0000)
lustre/liblustre/Makefile.am
lustre/liblustre/libtest.c

index 584dea7..c761a22 100644 (file)
@@ -5,10 +5,10 @@ CFLAGS:=-g -O2 -I$(top_srcdir)/utils -I$(PORTALS)/include  -I$(srcdir)/../includ
 
 KFLAGS:=
 CPPFLAGS = $(HAVE_LIBREADLINE)
-LIBS= 
+LIBS=
+LLIBS= ../lov/liblov.a ../obdecho/libobdecho.a ../osc/libosc.a ../ldlm/libldlm.a  ../ptlrpc/libptlrpc.a ../obdclass/liblustreclass.a
 
-libtest_LDADD := $(LIBREADLINE) ../lov/liblov.a ../obdecho/libobdecho.a ../osc/libosc.a ../ldlm/libldlm.a \
-                 ../ptlrpc/libptlrpc.a ../obdclass/liblustreclass.a  \
+libtest_LDADD := $(LIBREADLINE)  $(LLIBS) \
                  $(PORTALS)/user/procbridge/libprocbridge.a  $(PORTALS)/user/tcpnal/libtcpnal.a \
                 $(PORTALS)/user/util/libtcpnalutil.a $(PORTALS)/user/$(PORTALS)/api/libptlapi.a \
                  $(PORTALS)/lib/libptllib.a -lptlctl -lpthread -lefence
index fd5bb20..fce75c0 100644 (file)
@@ -1,4 +1,7 @@
 #include <stdio.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
 
 #include <portals/api-support.h> /* needed for ptpctl.h */
 #include <portals/ptlctl.h>    /* needed for parse_dump */
@@ -44,13 +47,15 @@ void init_current(int argc, char **argv)
 
 }
 
+extern ptl_nid_t tcpnal_mynid;
+
 int init_lib_portals(struct pingcli_args *args)
 {
         int rc;
 
         PtlInit();
-
-        rc = PtlNIInit(procbridge_interface, 0, 0, args->mynid, &tcpnal_ni);
+        tcpnal_mynid = args->mynid;
+        rc = PtlNIInit(procbridge_interface, 0, 0, 0, &tcpnal_ni);
         if (rc != 0) {
                 CERROR("ksocknal: PtlNIInit failed: error %d\n", rc);
                 PtlFini();
@@ -79,7 +84,7 @@ int lib_ioctl(int dev_id, int opc, void * ptr)
        return (0);
 }
 
-int main(int arc, char **argv) 
+int main(int argc, char **argv) 
 {
         struct pingcli_args *args;
        args= malloc(sizeof(*args));
@@ -88,12 +93,10 @@ int main(int arc, char **argv)
                 exit(1);
         }
 
-        args->mynid = atoi(argv[1]);
-        args->nid = atoi(argv[2]);
-       args->port = 9999;
-       args->count = atoi(argv[3]);
-       args->size = atoi(argv[4]);
+       args->mynid   = ntohl (inet_addr (argv[1]));
+        INIT_LIST_HEAD(&ocus.ocus_conns);
 
+        init_current(argc, argv);
         init_obdclass();
         init_lib_portals(args);
         ptlrpc_init();