|
@@ -320,7 +320,7 @@ static fetch_func_t get_fetch_size_function(const struct fetch_type *type,
|
|
|
}
|
|
|
|
|
|
/* Split symbol and offset. */
|
|
|
-int traceprobe_split_symbol_offset(char *symbol, unsigned long *offset)
|
|
|
+int traceprobe_split_symbol_offset(char *symbol, long *offset)
|
|
|
{
|
|
|
char *tmp;
|
|
|
int ret;
|
|
@@ -328,13 +328,11 @@ int traceprobe_split_symbol_offset(char *symbol, unsigned long *offset)
|
|
|
if (!offset)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- tmp = strchr(symbol, '+');
|
|
|
+ tmp = strpbrk(symbol, "+-");
|
|
|
if (tmp) {
|
|
|
- /* skip sign because kstrtoul doesn't accept '+' */
|
|
|
- ret = kstrtoul(tmp + 1, 0, offset);
|
|
|
+ ret = kstrtol(tmp, 0, offset);
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
-
|
|
|
*tmp = '\0';
|
|
|
} else
|
|
|
*offset = 0;
|