X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibuutil%2Finclude%2Flibuutil.h;h=667542446672a3fe08e1193fe0319e952d2da4f1;hb=2eadf037f5ae2735bcbc61e3bb2974c6d3235b8e;hp=ccd46b97748e7930bcdfd7c123d3b7d6dbb14533;hpb=172bb4bd5e4afef721dd4d2972d8680d983f144b;p=zfs.git diff --git a/lib/libuutil/include/libuutil.h b/lib/libuutil/include/libuutil.h index ccd46b9..6675424 100644 --- a/lib/libuutil/include/libuutil.h +++ b/lib/libuutil/include/libuutil.h @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _LIBUUTIL_H @@ -28,6 +27,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -142,12 +142,21 @@ extern int uu_open_tmp(const char *dir, uint_t uflags); /* * Convenience functions. */ +#define UU_NELEM(a) (sizeof (a) / sizeof ((a)[0])) + /*PRINTFLIKE1*/ extern char *uu_msprintf(const char *format, ...); extern void *uu_zalloc(size_t); extern char *uu_strdup(const char *); extern void uu_free(void *); +extern boolean_t uu_strcaseeq(const char *a, const char *b); +extern boolean_t uu_streq(const char *a, const char *b); +extern char *uu_strndup(const char *s, size_t n); +extern boolean_t uu_strbw(const char *a, const char *b); +extern void *uu_memdup(const void *buf, size_t sz); +extern void uu_dump(FILE *out, const char *prefix, const void *buf, size_t len); + /* * Comparison function type definition. * Developers should be careful in their use of the _private argument. If you