Add author and version fields for RIOPlugin

This commit is contained in:
pancake 2017-02-28 02:06:46 +01:00
parent 1cb8dcf905
commit 30aebdc521
4 changed files with 16 additions and 2 deletions

View File

@ -170,6 +170,8 @@ typedef struct r_io_plugin_t {
// void *plugin;
char *name;
char *desc;
char *version;
char *author;
char *license;
void *widget;
int (*listener)(RIODesc *io);

View File

@ -33,6 +33,8 @@ typedef struct r_lib_plugin_t {
void *data; /* user pointer */
struct r_lib_handler_t *handler;
void *dl_handler; // DL HANDLER
char *author;
char *version;
} RLibPlugin;
/* store list of initialized plugin handlers */

View File

@ -462,6 +462,8 @@ RIOPlugin r_io_plugin_debug = {
.name = "debug",
.desc = "Native debugger (dbg:///bin/ls dbg://1388 pidof:// waitfor://)",
.license = "LGPL3",
.author = "pancake",
.version = "0.1.0",
.open = __open,
.check = __plugin_open,
.isdbg = true,

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2008-2016 - pancake */
/* radare - LGPL - Copyright 2008-2017 - pancake */
/* TODO: write li->fds setter/getter helpers */
// TODO: return true/false everywhere,, not -1 or 0
@ -86,8 +86,16 @@ R_API int r_io_plugin_list(RIO *io) {
str[1] = plugin->write ? 'w' : '_';
str[2] = plugin->isdbg ? 'd' : '_';
str[3] = 0;
io->cb_printf ("%s %-8s %s (%s)\n", str, plugin->name,
io->cb_printf ("%s %-8s %s (%s)",
str, plugin->name,
plugin->desc, plugin->license);
if (plugin->version) {
io->cb_printf (" v%s", plugin->version);
}
if (plugin->author) {
io->cb_printf (" %s", plugin->author);
}
io->cb_printf ("\n");
n++;
}
return n;