crypt-burn: Accept a PLUGINS env var to configure plugins to load
authorMartin Willi <martin@revosec.ch>
Fri, 27 Mar 2015 09:00:49 +0000 (10:00 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 15 Apr 2015 09:35:25 +0000 (11:35 +0200)
scripts/crypt_burn.c

index 1768d76..268ac93 100644 (file)
@@ -25,12 +25,11 @@ int main(int argc, char *argv[])
        size_t bs;
        int i = 0, limit = 0;
 
-
        library_init(NULL, "crypt_burn");
-       lib->plugins->load(lib->plugins, PLUGINS);
+       lib->plugins->load(lib->plugins, getenv("PLUGINS") ?: PLUGINS);
        atexit(library_deinit);
 
-       printf("loaded: %s\n", PLUGINS);
+       fprintf(stderr, "loaded: %s\n", lib->plugins->loaded_plugins(lib->plugins));
 
        memset(buffer, 0x12, sizeof(buffer));
        memset(assoc, 0x34, sizeof(assoc));