unsigned min, unsigned max);
int cfs_human_readable2long(unsigned long *sizep, char *str);
int cfs_expr2str(struct list_head *list, char *str, size_t size);
-int cfs_expr_list_match(__u32 value, struct cfs_expr_list *expr_list);
int cfs_expr_list_print(char *buffer, int count,
struct cfs_expr_list *expr_list);
int cfs_expr_list_parse(char *str, int len, unsigned min, unsigned max,
}
/**
+ * Matches value (\a value) against ranges expression list \a expr_list.
+ *
+ * \retval 1 if \a value matches
+ * \retval 0 otherwise
+ */
+static int
+cfs_expr_list_match(__u32 value, struct cfs_expr_list *expr_list)
+{
+ struct cfs_range_expr *expr;
+
+ list_for_each_entry(expr, &expr_list->el_exprs, re_link) {
+ if (value >= expr->re_lo && value <= expr->re_hi &&
+ ((value - expr->re_lo) % expr->re_stride) == 0)
+ return 1;
+ }
+
+ return 0;
+}
+
+/**
* Matches address (\a addr) against address set encoded in \a list.
*
* \retval 1 if \a addr matches
}
/**
- * Matches value (\a value) against ranges expression list \a expr_list.
- *
- * \retval 1 if \a value matches
- * \retval 0 otherwise
- */
-int
-cfs_expr_list_match(__u32 value, struct cfs_expr_list *expr_list)
-{
- struct cfs_range_expr *expr;
-
- list_for_each_entry(expr, &expr_list->el_exprs, re_link) {
- if (value >= expr->re_lo && value <= expr->re_hi &&
- ((value - expr->re_lo) % expr->re_stride) == 0)
- return 1;
- }
-
- return 0;
-}
-
-/**
* Convert express list (\a expr_list) to an array of all matched values
*
* \retval N N is total number of all matched values
echo "building liblnetconfig_wrap.c"
$(CC) $(SWIG_COMPFLAGS) $(PYTHON_CPPFLAGS) $(DLC_INCLUDES) $(LIBLNETCONFIG_WRAP_I) $(CYAML_SRC)
echo "linking _lnetconfig.so"
- $(CC) $(LIBLNETCONFIG) -lyaml -llnetconfig -Wl,--whole-archive $(LIBCFS) $(CYAML_OBJ) -Wl,--no-whole-archive -shared -o _lnetconfig.so $(LIBLNETCONFIG_WRAP_OBJ) $(PYTHON_EXTRA_LIBS) $(PYTHON_LIBS)
+ $(CC) -shared -o _lnetconfig.so $(LIBCFS) -lyaml $(LIBLNETCONFIG) -llnetconfig $(CYAML_OBJ) $(LIBLNETCONFIG_WRAP_OBJ) $(PYTHON_EXTRA_LIBS) $(PYTHON_LIBS)
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(libdir)