From 91201d393d54a98859548ce86a8d31aedc706d86 Mon Sep 17 00:00:00 2001 From: braam Date: Wed, 26 Feb 2003 23:35:57 +0000 Subject: [PATCH] - miniature buildfixes for liblustre. --- lustre/include/liblustre.h | 2 ++ lustre/liblustre/Makefile.am | 2 +- lustre/liblustre/libtest.c | 19 ++++++++++++++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index a27abb9..145d199 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -143,9 +143,11 @@ extern int init_obdclass(void); extern int ptlrpc_init(void); extern int ldlm_init(void); extern int osc_init(void); +extern int lov_init(void); extern int echo_client_init(void); + /* general stuff */ #define jiffies 0 diff --git a/lustre/liblustre/Makefile.am b/lustre/liblustre/Makefile.am index 2f2ec6b..584dea7 100644 --- a/lustre/liblustre/Makefile.am +++ b/lustre/liblustre/Makefile.am @@ -7,7 +7,7 @@ KFLAGS:= CPPFLAGS = $(HAVE_LIBREADLINE) LIBS= -libtest_LDADD := $(LIBREADLINE) ../obdecho/libobdecho.a ../osc/libosc.a ../ldlm/libldlm.a \ +libtest_LDADD := $(LIBREADLINE) ../lov/liblov.a ../obdecho/libobdecho.a ../osc/libosc.a ../ldlm/libldlm.a \ ../ptlrpc/libptlrpc.a ../obdclass/liblustreclass.a \ $(PORTALS)/user/procbridge/libprocbridge.a $(PORTALS)/user/tcpnal/libtcpnal.a \ $(PORTALS)/user/util/libtcpnalutil.a $(PORTALS)/user/$(PORTALS)/api/libptlapi.a \ diff --git a/lustre/liblustre/libtest.c b/lustre/liblustre/libtest.c index 0f66a24..fd5bb20 100644 --- a/lustre/liblustre/libtest.c +++ b/lustre/liblustre/libtest.c @@ -3,7 +3,10 @@ #include /* needed for ptpctl.h */ #include /* needed for parse_dump */ + #include +#include +#include #include <../user/procbridge/procbridge.h> ptl_handle_ni_t tcpnal_ni; @@ -18,6 +21,8 @@ struct pingcli_args { struct task_struct *current; +struct obd_class_user_state ocus; + /* portals interfaces */ inline const ptl_handle_ni_t * kportal_get_ni (int nal) @@ -55,12 +60,15 @@ int init_lib_portals(struct pingcli_args *args) return rc; } +extern int class_handle_ioctl(struct obd_class_user_state *ocus, unsigned int cmd, unsigned long arg); + + int lib_ioctl(int dev_id, int opc, void * ptr) { + if (dev_id == OBD_DEV_ID) { - struct obd_ioctl_data *ioc = ptr; - /* call class_obd_ioctl function here */ - /* class_obd_ioctl(inode, filp, opc, (unsigned long) ioc); */ + struct obd_ioctl_data *ioc = ptr; + class_handle_ioctl(&ocus, opc, (unsigned long)ptr); /* you _may_ need to call obd_ioctl_unpack or some other verification function if you want to use ioc @@ -92,9 +100,10 @@ int main(int arc, char **argv) ldlm_init(); osc_init(); echo_client_init(); - /* XXX lov and mdc are next */ + /* XXX need mdc_getlovinfo before lov_init can work.. */ + // lov_init(); - parse_dump("DUMP_FILE", lib_ioctl); + parse_dump("/tmp/DUMP_FILE", lib_ioctl); printf("Hello\n"); return 0; -- 1.8.3.1