Fix #5909 - r2 -o is now -k

This commit is contained in:
pancake 2016-10-04 14:47:09 +02:00
parent 41d6e9edde
commit 516a095a04
3 changed files with 8 additions and 16 deletions

View File

@ -424,7 +424,7 @@ int main(int argc, char **argv, char **envp) {
return 0;
}
while ((c = getopt (argc, argv, "=0AMCwfF:hH::m:e:nk:o:Ndqs:p:b:B:a:Lui:I:l:P:R:c:D:vVSzu"
while ((c = getopt (argc, argv, "=0AMCwfF:hH::m:e:nk:Ndqs:p:b:B:a:Lui:I:l:P:R:c:D:vVSzu"
#if USE_THREADS
"t"
#endif
@ -493,16 +493,11 @@ int main(int argc, char **argv, char **envp) {
r_list_append (prefiles, optarg);
break;
case 'k':
{
char *out = sdb_querys (r.sdb, NULL, 0, optarg);
if (out && *out) {
r_cons_println (out);
}
free (out);
}
asmos = optarg;
break;
case 'l':
r_lib_open (r.lib, optarg);
break;
case 'o': asmos = optarg; break;
case 'l': r_lib_open (r.lib, optarg); break;
case 'L':
do_list_io_plugins = true;
break;

View File

@ -14,7 +14,7 @@ _r2 () {
COMPREPLY=( $(compgen -W "8 16 32 64" -- $cur ))
return 0
;;
-o)
-k)
COMPREPLY=( $(compgen -W "$(r2 -qc 'e asm.os=?' --)" -- $cur ))
return 0
;;

View File

@ -12,9 +12,8 @@
.Op Fl e Ar k=v
.Op Fl i Ar file
.Op Fl I Ar prefile
.Op Fl k Ar k=v
.Op Fl k Ar kernel
.Op Fl m Ar addr
.Op Fl o Ar kernel
.Op Fl p Ar project
.Op Fl P Ar patch
.Op Fl R Ar rarun2
@ -58,10 +57,8 @@ Blocksize = file size
Run script file. After the file is loaded
.It Fl I Ar file
Run script file. Before the file is loaded
.It Fl o Ar kernel
.It Fl k Ar kernel
Select kernel (asm.os) for syscall resolution
.It Fl k Ar k=v
Perform SDB query into the core->sdb instance
.It Fl l Ar plugfile
Load given plugin file
.It Fl L