StoragePlugin: pass EventLoop to constructor

This commit is contained in:
Max Kellermann
2014-10-07 19:45:40 +02:00
parent 1aac0b10c9
commit 3d2558bde6
11 changed files with 31 additions and 15 deletions

View File

@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "ScopeIOThread.hxx"
#include "storage/Registry.hxx"
#include "storage/StorageInterface.hxx"
#include "storage/FileInfo.hxx"
@@ -38,7 +39,7 @@ static Storage *
MakeStorage(const char *uri)
{
Error error;
Storage *storage = CreateStorageURI(uri, error);
Storage *storage = CreateStorageURI(io_thread_get(), uri, error);
if (storage == nullptr) {
fprintf(stderr, "%s\n", error.GetMessage());
exit(EXIT_FAILURE);
@@ -112,6 +113,8 @@ main(int argc, char **argv)
const char *const command = argv[1];
const char *const storage_uri = argv[2];
const ScopeIOThread io_thread;
if (strcmp(command, "ls") == 0) {
if (argc != 4) {
fprintf(stderr, "Usage: run_storage ls URI PATH\n");