File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2325,11 +2325,19 @@ struct sym_args {
2325
2325
bool near ;
2326
2326
};
2327
2327
2328
+ static bool kern_sym_name_match (const char * kname , const char * name )
2329
+ {
2330
+ size_t n = strlen (name );
2331
+
2332
+ return !strcmp (kname , name ) ||
2333
+ (!strncmp (kname , name , n ) && kname [n ] == '\t' );
2334
+ }
2335
+
2328
2336
static bool kern_sym_match (struct sym_args * args , const char * name , char type )
2329
2337
{
2330
2338
/* A function with the same name, and global or the n'th found or any */
2331
2339
return kallsyms__is_function (type ) &&
2332
- ! strcmp (name , args -> name ) &&
2340
+ kern_sym_name_match (name , args -> name ) &&
2333
2341
((args -> global && isupper (type )) ||
2334
2342
(args -> selected && ++ (args -> cnt ) == args -> idx ) ||
2335
2343
(!args -> global && !args -> selected ));
You can’t perform that action at this time.
0 commit comments