1#ifndef __NVKM_OPTION_H__
2#define __NVKM_OPTION_H__
3#include <core/os.h>
4
5const char *nvkm_stropt(const char *optstr, const char *opt, int *len);
6bool nvkm_boolopt(const char *optstr, const char *opt, bool value);
7int  nvkm_dbgopt(const char *optstr, const char *sub);
8
9/* compares unterminated string 'str' with zero-terminated string 'cmp' */
10static inline int
11strncasecmpz(const char *str, const char *cmp, size_t len)
12{
13	if (strlen(cmp) != len)
14		return len;
15	return strncasecmp(str, cmp, len);
16}
17#endif
18