if string contains a hugepage path */
| 136 | |
| 137 | /* if string contains a hugepage path */ |
| 138 | static int |
| 139 | get_hugepage_path(char * src, int src_len, char * dst, int dst_len) |
| 140 | { |
| 141 | #define NUM_TOKENS 4 |
| 142 | char *tokens[NUM_TOKENS]; |
| 143 | |
| 144 | /* if we couldn't properly split the string */ |
| 145 | if (rte_strsplit(src, src_len, tokens, NUM_TOKENS, ' ') < NUM_TOKENS) |
| 146 | return 0; |
| 147 | |
| 148 | if (strncmp(tokens[2], "hugetlbfs", sizeof("hugetlbfs")) == 0) { |
| 149 | strlcpy(dst, tokens[1], dst_len); |
| 150 | return 1; |
| 151 | } |
| 152 | return 0; |
| 153 | } |
| 154 | |
| 155 | /* |
| 156 | * Cycles through hugepage directories and looks for hugepage |
no test coverage detected