int string_to_size(u64 *size, const char *buffer, size_t count);
int sysfs_memparse(const char *buffer, size_t count, u64 *val,
const char *defunit);
-char *lprocfs_strnstr(const char *s1, const char *s2, size_t len);
char *lprocfs_find_named_value(const char *buffer, const char *name,
size_t *count);
void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value);
}
EXPORT_SYMBOL(sysfs_memparse);
-char *lprocfs_strnstr(const char *s1, const char *s2, size_t len)
-{
- size_t l2;
-
- l2 = strlen(s2);
- if (!l2)
- return (char *)s1;
- while (len >= l2) {
- len--;
- if (!memcmp(s1, s2, l2))
- return (char *)s1;
- s1++;
- }
- return NULL;
-}
-EXPORT_SYMBOL(lprocfs_strnstr);
-
/**
* Find the string \a name in the input \a buffer, and return a pointer to the
* value immediately following \a name, reducing \a count appropriately.
char *val;
size_t buflen = *count;
- /* there is no strnstr() in rhel5 and ubuntu kernels */
- val = lprocfs_strnstr(buffer, name, buflen);
+ val = strnstr(buffer, name, buflen);
if (!val)
return (char *)buffer;