diff options
| author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2017-10-26 20:44:42 +0000 |
|---|---|---|
| committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2017-10-26 20:44:42 +0000 |
| commit | 23c5a51e92dfe00ea297be0caff1ff2ec9fe4c93 (patch) | |
| tree | 2d4d144c46735aaa4a05ec943af9ac47bd9b5eae /sys | |
| parent | df485bdb3ce1e7347de7dac08130926dac10ada4 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/contrib/libnv/cnvlist.c | 14 | ||||
| -rw-r--r-- | sys/sys/cnv.h | 6 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sys/contrib/libnv/cnvlist.c b/sys/contrib/libnv/cnvlist.c index 0886da69674d..aff1c8e612ec 100644 --- a/sys/contrib/libnv/cnvlist.c +++ b/sys/contrib/libnv/cnvlist.c @@ -53,6 +53,20 @@ __FBSDID("$FreeBSD$"); #include "nvlist_impl.h" #include "nvpair_impl.h" +const char * +cnvlist_name(void *cookiep) +{ + + return (nvpair_name(cookiep)); +} + +int +cnvlist_type(void *cookiep) +{ + + return (nvpair_type(cookiep)); +} + #define CNVLIST_GET(ftype, type, NVTYPE) \ ftype \ cnvlist_get_##type(void *cookiep) \ diff --git a/sys/sys/cnv.h b/sys/sys/cnv.h index 8b76e596bf2e..c89eed37df3e 100644 --- a/sys/sys/cnv.h +++ b/sys/sys/cnv.h @@ -48,6 +48,12 @@ typedef struct nvlist nvlist_t; __BEGIN_DECLS /* + * Functions which returns information about the given cookie. + */ +const char *cnvlist_name(void *cookiep); +int cnvlist_type(void *cookiep); + +/* * The cnvlist_get functions returns value associated with the given cookie. * If it returns a pointer, the pointer represents internal buffer and should * not be freed by the caller. |
