+ return *res_counter_member(counter, member);
+}
+
+int res_counter_memparse_write_strategy(const char *buf,
+ unsigned long long *res)
+{
+ char *end;
+
+ /* return RESOURCE_MAX(unlimited) if "-1" is specified */
+ if (*buf == '-') {
+ *res = simple_strtoull(buf + 1, &end, 10);
+ if (*res != 1 || *end != '\0')
+ return -EINVAL;
+ *res = RESOURCE_MAX;
+ return 0;
+ }