Migrate the backported glob code to lustre_compat.
Eventually, all of the Lustre/LNet compatability code
will live in lustre_compat - maintaining a clear
separation from the functional code in Lustre and LNet.
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I7e57326a0ed10225e2ee866071ea7c3d259d29d4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58145
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
EXTRA_DIST = linux-misc.h linux-fs.h linux-mem.h linux-time.h linux-cpu.h \
linux-list.h linux-hash.h linux-wait.h linux-net.h \
- generic-radix-tree.h glob.h refcount.h processor.h \
+ generic-radix-tree.h refcount.h processor.h \
linux-fortify-string.h
libcfs-linux-objs += linux-hash.o
libcfs-linux-objs += linux-wait.o
libcfs-linux-objs += generic-radix-tree.o
-libcfs-linux-objs += glob.o
libcfs-compat-objs += $(patsubst %,$(COMPAT)%,$(compat_objs))
EXTRA_DIST = linux-prim.c \
linux-hash.c \
linux-wait.c \
- generic-radix-tree.c \
- glob.c
+ generic-radix-tree.c
#define DEBUG_SUBSYSTEM S_CLASS
#include <linux/file.h>
-#include <linux/glob.h>
+#include <lustre_compat/linux/glob.h>
#include <linux/types.h>
#include <libcfs/linux/linux-net.h>
#define DEBUG_SUBSYSTEM S_CLASS
-#include <linux/glob.h>
+#include <lustre_compat/linux/glob.h>
#include <obd_class.h>
#include <lprocfs_status.h>
#include <lustre_kernelcomm.h>
# This file is part of Lustre, http://www.lustre.org/
#
-EXTRA_DIST = xarray.h
+EXTRA_DIST = xarray.h glob.h
/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _LINUX_GLOB_H
-#define _LINUX_GLOB_H
+#ifndef _LINUX_GLOB_LUSTRE_H
+#define _LINUX_GLOB_LUSTRE_H
#ifndef HAVE_GLOB
#include <linux/compiler.h> /* For __pure */
bool __pure glob_match(char const *pat, char const *str);
+
+#else
+#include <linux/glob.h>
#endif /* !HAVE_GLOB */
-#endif /* _LINUX_GLOB_H */
+#endif /* _LINUX_GLOB_LUSTRE_H */
# This file is part of Lustre, http://www.lustre.org/
#
-compat_objs := xarray.o
+compat_objs := xarray.o glob.o
EXTRA_DIST = $(compat_objs:.o=.c)
#ifndef HAVE_GLOB
#include <linux/module.h>
-#include "libcfs/linux/glob.h"
+#include <lustre_compat/linux/glob.h>
/**
* glob_match - Shell-style pattern matching, like !fnmatch(pat, str, 0)