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