mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-17 04:39:36 +00:00
Fix r2 -H MAGICPATH
This commit is contained in:
parent
87267a9e35
commit
9cb663cbdb
@ -191,7 +191,7 @@ static int main_help(int line) {
|
||||
"Environment:\n"
|
||||
" RDATAHOME %s\n" // TODO: rename to RHOME R2HOME?
|
||||
" RCFILE ~/.radare2rc (user preferences, batch script)\n" // TOO GENERIC
|
||||
" MAGICPATH "R2_SDB_MAGIC"\n"
|
||||
" MAGICPATH " R_JOIN_2_PATHS ("%s", R2_SDB_MAGIC) "\n"
|
||||
" R_DEBUG if defined, show error messages and crash signal\n"
|
||||
" VAPIDIR path to extra vapi directory\n"
|
||||
" R2_NOPLUGINS do not load r2 shared plugins\n"
|
||||
@ -200,7 +200,7 @@ static int main_help(int line) {
|
||||
" R2_INCDIR "R2_INCDIR"\n"
|
||||
" R2_LIBDIR "R2_LIBDIR"\n"
|
||||
" R2_LIBEXT "R_LIB_EXT"\n"
|
||||
, dirPrefix, datahome);
|
||||
, dirPrefix, datahome, dirPrefix);
|
||||
free (datahome);
|
||||
}
|
||||
return 0;
|
||||
@ -214,12 +214,13 @@ static int main_print_var(const char *var_name) {
|
||||
char *homeplugins = r_str_home (R2_HOME_PLUGINS);
|
||||
char *homezigns = r_str_home (R2_HOME_ZIGNS);
|
||||
char *plugins = r_str_r2_prefix (R2_PLUGINS);
|
||||
char *magicpath = r_str_r2_prefix (R2_SDB_MAGIC);
|
||||
struct radare2_var_t {
|
||||
const char *name;
|
||||
const char *value;
|
||||
} r2_vars[] = {
|
||||
{ "R2_PREFIX", R2_PREFIX },
|
||||
{ "MAGICPATH", R2_SDB_MAGIC },
|
||||
{ "MAGICPATH", magicpath },
|
||||
{ "PREFIX", R2_PREFIX },
|
||||
{ "INCDIR", R2_INCDIR },
|
||||
{ "LIBDIR", R2_LIBDIR },
|
||||
@ -252,6 +253,7 @@ static int main_print_var(const char *var_name) {
|
||||
free (homeplugins);
|
||||
free (homezigns);
|
||||
free (plugins);
|
||||
free (magicpath);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1105,7 +1105,7 @@ static void annotated_hexdump(RCore *core, const char *str, int len) {
|
||||
}
|
||||
char *format = compact ? " %X %X" : " %X %X ";
|
||||
int step = compact ? 4 : 5;
|
||||
|
||||
|
||||
// Adjust the number of columns
|
||||
if (nb_cols < 1) {
|
||||
nb_cols = 16;
|
||||
@ -2069,7 +2069,7 @@ r_cons_pop();
|
||||
if (show_offset) {
|
||||
r_cons_printf ("0x%08"PFMT64x" ", addr);
|
||||
}
|
||||
r_cons_printf ("%s%s%s%s%s\n",
|
||||
r_cons_printf ("%s%s%s%s%s\n",
|
||||
string2? string2: "", string2? " ": "", string,
|
||||
flag? " ": "", flag? flag->name: "");
|
||||
}
|
||||
@ -4719,7 +4719,7 @@ static int cmd_print(void *data, const char *input) {
|
||||
"| foo@0x40 # use 'foo' magic file on address 0x40\n"
|
||||
"| @0x40 # use current magic file on address 0x40\n"
|
||||
"| \\n # append newline\n"
|
||||
"| e dir.magic # defaults to "R2_SDB_MAGIC "\n"
|
||||
"| e dir.magic # defaults to " R_JOIN_2_PATHS ("{R2_PREFIX}", R2_SDB_MAGIC) "\n"
|
||||
"| /m # search for magic signatures\n"
|
||||
);
|
||||
} else {
|
||||
@ -5630,11 +5630,11 @@ static int cmd_print(void *data, const char *input) {
|
||||
from = map1->itv.addr;
|
||||
r_list_foreach (list, iter, map) {
|
||||
to = r_itv_end (map->itv);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
from = core->offset;
|
||||
to = from + core->blocksize;
|
||||
}
|
||||
}
|
||||
ut64 maxsize = r_config_get_i (core->config, "zoom.maxsz");
|
||||
int oldva = core->io->va;
|
||||
char *oldmode = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user