summaryrefslogtreecommitdiff
path: root/apps/plugins/md5sum.c
diff options
context:
space:
mode:
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 @@
24 24
25PLUGIN_HEADER 25PLUGIN_HEADER
26 26
27static const struct plugin_api *rb; 27MEM_FUNCTION_WRAPPERS;
28
29MEM_FUNCTION_WRAPPERS(rb);
30 28
31#define BUFFERSIZE 16384 29#define BUFFERSIZE 16384
32 30
@@ -183,7 +181,7 @@ static void hash_check( int out, const char *path )
183 rb->close( list ); 181 rb->close( list );
184} 182}
185 183
186enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 184enum plugin_status plugin_start(const void* parameter)
187{ 185{
188 const char *arg = (const char *)parameter; /* input file name, if any */ 186 const char *arg = (const char *)parameter; /* input file name, if any */
189 int out = -1; /* output file descriptor */ 187 int out = -1; /* output file descriptor */
@@ -191,8 +189,6 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
191 189
192 void (*action)( int, const char * ) = NULL; 190 void (*action)( int, const char * ) = NULL;
193 191
194 md5_init( api );
195 rb = api;
196#ifdef HAVE_ADJUSTABLE_CPU_FREQ 192#ifdef HAVE_ADJUSTABLE_CPU_FREQ
197 rb->cpu_boost( true ); 193 rb->cpu_boost( true );
198#endif 194#endif
@@ -225,7 +221,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
225 dir = rb->opendir( arg ); 221 dir = rb->opendir( arg );
226 if( dir ) 222 if( dir )
227 { 223 {
228 api->closedir( dir ); 224 rb->closedir( dir );
229 225
230 /* Hash the directory's content recursively */ 226 /* Hash the directory's content recursively */
231 action = hash_dir; 227 action = hash_dir;