Skip to content

Commit

Permalink
Fix visual mountpointss, move it into Vb ##visual
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Mar 20, 2019
1 parent dc7abc8 commit f6199df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
14 changes: 7 additions & 7 deletions libr/core/visual.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static const char *help_msg_visual[] = {
"/*+-[]", "change block size, [] = resize hex.cols",
"<,>", "seek aligned to block size (in cursor slurp or dump files)",
"a/A", "(a)ssemble code, visual (A)ssembler",
"b", "browse evals, symbols, flags, configurations, classes, ...",
"b", "browse evals, symbols, flags, mountpoints, evals, classes, ...",
"B", "toggle breakpoint",
"c/C", "toggle (c)ursor and (C)olors",
"d[f?]", "define function, data, code, ..",
Expand All @@ -272,7 +272,6 @@ static const char *help_msg_visual[] = {
"i", "insert hex or string (in hexdump) use tab to toggle",
"I", "insert hexpair block ",
"mK/'K", "mark/go to Key (any key)",
"M", "walk the mounted filesystems",
"n/N", "seek next/prev function/flag/hit (scr.nkey)",
"g", "go/seek to given offset (o[g/G]<enter> to seek begin/end of file)",
"O", "toggle asm.pseudo and asm.esil",
Expand Down Expand Up @@ -1960,6 +1959,7 @@ R_API void r_core_visual_browse(RCore *core, const char *input) {
" i imports\n"
" l chat logs (previously VT)\n"
" m maps\n"
" M mountpoints\n"
" p pids/threads\n"
" q quit\n"
" r ROP gadgets\n"
Expand All @@ -1985,6 +1985,11 @@ R_API void r_core_visual_browse(RCore *core, const char *input) {
}
ch = r_cons_arrow_to_hjkl (ch);
switch (ch) {
case 'M':
if (!r_list_empty (core->fs->roots)) {
r_core_visual_mounts (core);
}
break;
case 'z': // "vbz"
if (r_core_visual_view_zigns (core)) {
return;
Expand Down Expand Up @@ -2644,11 +2649,6 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
case 'E':
r_core_visual_colors (core);
break;
case 'M':
if (!r_list_empty (core->fs->roots)) {
r_core_visual_mounts (core);
}
break;
case 'x':
r_core_visual_refs (core, true, false);
break;
Expand Down
3 changes: 1 addition & 2 deletions libr/core/vmenus.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,10 +2278,9 @@ R_API void r_core_visual_mounts(RCore *core) {
ch = r_cons_arrow_to_hjkl (ch);
switch (ch) {
case '/':
if (root) R_FREE (root);
R_FREE (root);
root = strdup ("/");
strncpy (path, root, sizeof (path)-1);
R_FREE (root);
mode = 2;
break;
case 'l':
Expand Down

0 comments on commit f6199df

Please sign in to comment.