summaryrefslogtreecommitdiff
path: root/apps/plugins/md5sum.c
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-01-16 10:34:40 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-01-16 10:34:40 +0000
commit23d9812273d9c74af72ccdc3aa4cfea971f220a4 (patch)
tree8e60c3a2a41879f8b2a52516fa416b3ab906e239 /apps/plugins/md5sum.c
parent35677cbc54bbe400ebbff59b489dda7ca7f04916 (diff)
loader-initialized global plugin API:
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/md5sum.c')
-rw-r--r--apps/plugins/md5sum.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/plugins/md5sum.c b/apps/plugins/md5sum.c
index 6479f204a2..03db427f29 100644
--- a/apps/plugins/md5sum.c
+++ b/apps/plugins/md5sum.c
@@ -24,9 +24,7 @@
PLUGIN_HEADER
-static const struct plugin_api *rb;
-
-MEM_FUNCTION_WRAPPERS(rb);
+MEM_FUNCTION_WRAPPERS;
#define BUFFERSIZE 16384
@@ -183,7 +181,7 @@ static void hash_check( int out, const char *path )
rb->close( list );
}
-enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
+enum plugin_status plugin_start(const void* parameter)
{
const char *arg = (const char *)parameter; /* input file name, if any */
int out = -1; /* output file descriptor */
@@ -191,8 +189,6 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
void (*action)( int, const char * ) = NULL;
- md5_init( api );
- rb = api;
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
rb->cpu_boost( true );
#endif
@@ -225,7 +221,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
dir = rb->opendir( arg );
if( dir )
{
- api->closedir( dir );
+ rb->closedir( dir );
/* Hash the directory's content recursively */
action = hash_dir;