25 #ifndef __MOTR_LIB_STRING_H__ 26 #define __MOTR_LIB_STRING_H__ 34 #define m0_streq(a, b) (strcmp((a), (b)) == 0) 35 #define m0_strcaseeq(a, b) (strcasecmp((a), (b)) == 0) 43 #define m0_strdup(s) strdup((s)) 44 #define m0_asprintf(s, fmt, ...) \ 48 __nr = asprintf(__s, (fmt), __VA_ARGS__); \ 54 # include <linux/ctype.h> 55 # include <linux/kernel.h> 56 # include <linux/string.h> 58 #define m0_strdup(s) kstrdup((s), GFP_KERNEL) 59 #define m0_asprintf(s, fmt, ...) \ 60 ({ *(s) = kasprintf(GFP_ATOMIC, (fmt), __VA_ARGS__); }) 62 static inline char *strerror(
int errnum)
64 return "strerror() is not supported in kernel";
const char * m0_bcount_with_suffix(char *buf, size_t size, m0_bcount_t c)
static struct m0_uint128 prefix
enum m0_md_lustre_logrec_type __attribute__
static struct m0_addb2_callback c
M0_INTERNAL void m0_strings_free(const char **arr)
M0_INTERNAL char M0_INTERNAL bool m0_startswith(const char *prefix, const char *str)
struct m0_fop_str M0_XCA_DOMAIN(rpc)
M0_INTERNAL const char ** m0_strings_dup(const char **src)
M0_INTERNAL char * m0_vsnprintf(char *buf, size_t buflen, const char *format,...) __attribute__((format(printf
struct m0_pdclust_src_addr src