]>
Commit | Line | Data |
---|---|---|
6d591c46 LW |
1 | /* |
2 | * GPIO tools - utility helpers library for the GPIO tools | |
3 | * | |
4 | * Copyright (C) 2015 Linus Walleij | |
5 | * | |
6 | * Portions copied from iio_utils and lssio: | |
7 | * Copyright (c) 2010 Manuel Stahl <manuel.stahl@iis.fraunhofer.de> | |
8 | * Copyright (c) 2008 Jonathan Cameron | |
9 | * * | |
10 | * This program is free software; you can redistribute it and/or modify it | |
11 | * under the terms of the GNU General Public License version 2 as published by | |
12 | * the Free Software Foundation. | |
13 | */ | |
14 | #ifndef _GPIO_UTILS_H_ | |
15 | #define _GPIO_UTILS_H_ | |
16 | ||
17 | #include <string.h> | |
18 | ||
19 | static inline int check_prefix(const char *str, const char *prefix) | |
20 | { | |
21 | return strlen(str) > strlen(prefix) && | |
22 | strncmp(str, prefix, strlen(prefix)) == 0; | |
23 | } | |
24 | ||
25 | #endif /* _GPIO_UTILS_H_ */ |