# HG changeset patch # User Josef 'Jeff' Sipek # Date 1445095965 14400 # Node ID 17a1cd072c4311bf7058223ea829a378485b1b64 # Parent 1235adf7e449727b73bb463a69f784464adf48bc objstore: implement getroot wrapper Signed-off-by: Josef 'Jeff' Sipek diff -r 1235adf7e449 -r 17a1cd072c43 src/objstore/include/nomad/objstore.h --- a/src/objstore/include/nomad/objstore.h Sat Oct 17 10:39:07 2015 -0400 +++ b/src/objstore/include/nomad/objstore.h Sat Oct 17 11:32:45 2015 -0400 @@ -47,4 +47,7 @@ enum objstore_mode mode); extern struct objstore *objstore_store_load(struct nuuid *uuid, const char *path); +/* store operations */ +extern int objstore_getroot(struct objstore *store, struct nobjhndl *hndl); + #endif diff -r 1235adf7e449 -r 17a1cd072c43 src/objstore/objstore.c --- a/src/objstore/objstore.c Sat Oct 17 10:39:07 2015 -0400 +++ b/src/objstore/objstore.c Sat Oct 17 11:32:45 2015 -0400 @@ -112,3 +112,14 @@ { return ERR_PTR(ENOTSUP); } + +int objstore_getroot(struct objstore *store, struct nobjhndl *hndl) +{ + if (!hndl) + return EINVAL; + + if (!store || !store->def->store_ops || !store->def->store_ops->getroot) + return EINVAL; + + return store->def->store_ops->getroot(store, hndl); +}