From: robert.read Date: Mon, 11 Aug 2008 20:07:06 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_50~26 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b344dd11707dac42351aa1cd2e01ccf3069ea789 Branch HEAD b=16639 i=umka i=nathan Fix user space build when older kernel is installed, and remove old and redundant code.. --- diff --git a/libcfs/include/libcfs/Makefile.am b/libcfs/include/libcfs/Makefile.am index 207e7f6..dc2b841 100644 --- a/libcfs/include/libcfs/Makefile.am +++ b/libcfs/include/libcfs/Makefile.am @@ -1,3 +1,4 @@ + SUBDIRS := linux posix util if DARWIN SUBDIRS += darwin @@ -5,7 +6,7 @@ endif DIST_SUBDIRS := $(SUBDIRS) EXTRA_DIST := curproc.h libcfs_private.h libcfs.h list.h lltrace.h \ - portals_utils.h user-lock.h user-prim.h user-time.h \ + user-lock.h user-prim.h user-time.h \ user-tcpip.h user-bitops.h bitmap.h user-mem.h\ libcfs_prim.h libcfs_private.h libcfs_hash.h libcfs_time.h \ libcfs_debug.h libcfsutil.h libcfs_ioctl.h diff --git a/libcfs/include/libcfs/darwin/Makefile.am b/libcfs/include/libcfs/darwin/Makefile.am index f2f217a..b37750e 100644 --- a/libcfs/include/libcfs/darwin/Makefile.am +++ b/libcfs/include/libcfs/darwin/Makefile.am @@ -1,3 +1,3 @@ -EXTRA_DIST := darwin-mem.h darwin-types.h libcfs.h portals_utils.h \ +EXTRA_DIST := darwin-mem.h darwin-types.h libcfs. \ darwin-fs.h darwin-prim.h darwin-utils.h lltrace.h \ darwin-lock.h darwin-sync.h darwin-tcpip.h kp30.h diff --git a/libcfs/include/libcfs/linux/Makefile.am b/libcfs/include/libcfs/linux/Makefile.am index 072a7ad..a1f46cc 100644 --- a/libcfs/include/libcfs/linux/Makefile.am +++ b/libcfs/include/libcfs/linux/Makefile.am @@ -1,3 +1,3 @@ EXTRA_DIST := kp30.h libcfs.h linux-fs.h linux-lock.h linux-mem.h \ linux-prim.h linux-time.h linux-tcpip.h lltrace.h \ - portals_compat25.h portals_utils.h + portals_compat25.h \ No newline at end of file diff --git a/libcfs/include/libcfs/winnt/portals_utils.h b/libcfs/include/libcfs/winnt/portals_utils.h index 5c7c7b7..c9ae107 100644 --- a/libcfs/include/libcfs/winnt/portals_utils.h +++ b/libcfs/include/libcfs/winnt/portals_utils.h @@ -41,10 +41,6 @@ #ifndef __LIBCFS_WINNT_PORTALS_UTILS_H__ #define __LIBCFS_WINNT_PORTALS_UTILS_H__ -#ifndef __LIBCFS_PORTALS_UTILS_H__ -#error Do not #include this file directly. #include instead -#endif - #ifndef cfs_is_flag_set #define cfs_is_flag_set(x,f) (((x)&(f))==(f)) #endif diff --git a/libcfs/libcfs/util/l_ioctl.c b/libcfs/libcfs/util/l_ioctl.c index 09cd171..59dc6d8 100644 --- a/libcfs/libcfs/util/l_ioctl.c +++ b/libcfs/libcfs/util/l_ioctl.c @@ -22,24 +22,10 @@ #define __USE_FILE_OFFSET64 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - #include #include #include -#include - static ioc_handler_t do_ioctl; /* forward ref */ static ioc_handler_t *current_ioc_handler = &do_ioctl; @@ -261,7 +247,7 @@ parse_dump(char * dump_file, ioc_handler_t ioc_func) #endif #ifndef __CYGWIN__ - fd = syscall(SYS_open, dump_file, O_RDONLY); + fd = open(dump_file, O_RDONLY); if (fd < 0) { fprintf(stderr, "couldn't open %s: %s\n", dump_file, strerror(errno)); diff --git a/lnet/utils/debug.c b/lnet/utils/debug.c index a4376fd..e1371c7 100644 --- a/lnet/utils/debug.c +++ b/lnet/utils/debug.c @@ -43,34 +43,10 @@ #define _GNU_SOURCE #endif -#include -#ifdef HAVE_NETDB_H -#include -#endif -#include -#include -#ifdef HAVE_SYS_IOCTL_H -#include -#endif -#ifndef _IOWR -#include "ioctl.h" -#endif -#include -#include -#include -#include - -#include -#include -#include -#include -#include - #include #include -#include -#include +#include static char rawbuf[8192]; static char *buf = rawbuf; @@ -802,44 +778,6 @@ static struct mod_paths { static int jt_dbg_modules_2_4(int argc, char **argv) { -#ifdef HAVE_LINUX_VERSION_H -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - struct mod_paths *mp; - char *path = ""; - char *kernel = "linux"; - - if (argc >= 2) - path = argv[1]; - if (argc == 3) - kernel = argv[2]; - if (argc > 3) { - printf("%s [path] [kernel]\n", argv[0]); - return 0; - } - - for (mp = mod_paths; mp->name != NULL; mp++) { - struct module_info info; - int rc; - size_t crap; - int query_module(const char *name, int which, void *buf, - size_t bufsize, size_t *ret); - - rc = query_module(mp->name, QM_INFO, &info, sizeof(info), - &crap); - if (rc < 0) { - if (errno != ENOENT) - printf("query_module(%s) failed: %s\n", - mp->name, strerror(errno)); - } else { - printf("add-symbol-file %s%s%s/%s.o 0x%0lx\n", path, - path[0] ? "/" : "", mp->path, mp->name, - info.addr + sizeof(struct module)); - } - } - - return 0; -#endif // Headers are 2.6-only -#endif // !HAVE_LINUX_VERSION_H return -EINVAL; }