]) # LC_FID2PATH_ANON_UNION
#
-# LC_IOC_REMOVE_ENTRY
-#
-AC_DEFUN([LC_IOC_REMOVE_ENTRY], [
-saved_flags="$CFLAGS"
-CFLAGS="$CFLAGS -Werror"
-AC_MSG_CHECKING([if ioctl IOC_REMOVE_ENTRY' is supported])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #include <sys/ioctl.h>
- #include <linux/lustre/lustre_ioctl.h>
-
- int main(void) {
- return ioctl(0, LL_IOC_REMOVE_ENTRY, NULL);
- }
-])],[
- AC_DEFINE(HAVE_IOC_REMOVE_ENTRY, 1,
- [IOC_REMOVE_ENTRY ioctl exists])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-CFLAGS="$saved_flags"
-]) # LC_IOC_REMOVE_ENTRY
-
-#
# LC_STACK_SIZE
#
# Ensure the stack size is at least 8k in Lustre server (all kernels)
static inline char *changelog_rec_sname(const struct changelog_rec *rec)
{
- return strchrnul(changelog_rec_name(rec), '\0') + 1;
+ char *str = changelog_rec_name(rec);
+
+ while (*str != '\0')
+ str++;
+ return str + 1;
}
static inline __kernel_size_t changelog_rec_snamelen(const struct changelog_rec *rec)
local prefix=/usr/include/lustre
local prog
- # Oleg removes c files in his test rig so test if any c files exist
- [ -z "$(ls -A $LUSTRE_TESTS_API_DIR)" ] && \
- skip_env "Needed c test files are missing"
+ # Oleg removes .c files in his test rig so test if any c files exist
+ [[ -n "$(ls -A $LUSTRE_TESTS_API_DIR)" ]] ||
+ skip_env "Needed .c test files are missing"
if ! [[ -d $prefix ]]; then
# Assume we're running in tree and fixup the include path.
- extra_flags+=" -I$LUSTRE/../lnet/include/uapi -I$LUSTRE/include/uapi -I$LUSTRE/include"
- extra_flags+=" -L$LUSTRE/utils/.lib"
+ extra_flags+=" -I$LUSTRE/../lnet/include/uapi"
+ extra_flags+=" -I$LUSTRE/include/uapi -I$LUSTRE/include"
+ extra_flags+=" -L$LUSTRE/utils/.libs"
fi
for prog in $LUSTRE_TESTS_API_DIR/*.c; do
- $CC -Wall -Werror -std=c99 $extra_flags -o $out $prog -llustreapi ||
+ $CC -Wall -Werror $extra_flags -o $out $prog -llustreapi ||
error "client api broken"
done
rm -f $out
continue # lustre_ioctl.h is internal header
fi
- $CC -Wall -Werror -std=c99 -include $header -c -x c /dev/null -o $out ||
+ $CC -Wall -Werror -include $header -c -x c /dev/null -o $out ||
error "cannot compile '$header'"
done
rm -f $out