mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-04 04:28:20 +00:00
Fix #3471 - Show number of matches in 'z'
This commit is contained in:
parent
b2df63cba2
commit
b8224a153f
@ -1,4 +1,4 @@
|
||||
/* radare - LGPL - Copyright 2009-2014 - pancake */
|
||||
/* radare - LGPL - Copyright 2009-2015 - pancake */
|
||||
|
||||
#include <r_sign.h>
|
||||
#include <r_anal.h>
|
||||
@ -112,6 +112,7 @@ R_API void r_sign_list(RSign *sig, int rad) {
|
||||
sig->cb_printf (" %d byte signatures\n", sig->s_byte);
|
||||
sig->cb_printf (" %d head signatures\n", sig->s_head);
|
||||
sig->cb_printf (" %d func signatures\n", sig->s_func);
|
||||
sig->cb_printf ("Found %d matches\n", sig->matches);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,11 @@ static int cmd_zign(void *data, const char *input) {
|
||||
} else eprintf ("Cannot read %d bytes at 0x%08"PFMT64x"\n", len, ini);
|
||||
r_cons_break_end ();
|
||||
free (buf);
|
||||
} else eprintf ("Cannot alloc %d bytes\n", len);
|
||||
core->sign->matches = count;
|
||||
} else {
|
||||
eprintf ("Cannot alloc %d bytes\n", len);
|
||||
core->sign->matches = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case '\0':
|
||||
|
@ -37,6 +37,7 @@ typedef struct r_sign_t {
|
||||
char ns[32]; // namespace
|
||||
PrintfCallback cb_printf;
|
||||
RList *items;
|
||||
int matches;
|
||||
} RSign;
|
||||
|
||||
typedef int (*RSignCallback)(RSignItem *si, void *user);
|
||||
|
Loading…
x
Reference in New Issue
Block a user