# HG changeset patch # User Matti Hamalainen # Date 1349245769 -10800 # Node ID 1c2ff205fa0e87dc4bd3ac84b3392ee9986f50de # Parent 93fbce0e6591e748fa6b35183bb28ecceb6955cc Cleanups. diff -r 93fbce0e6591 -r 1c2ff205fa0e dmres.c --- a/dmres.c Wed Oct 03 09:19:08 2012 +0300 +++ b/dmres.c Wed Oct 03 09:29:29 2012 +0300 @@ -872,7 +872,7 @@ /* Resources subsystem initialization and shutdown routines */ -int dmres_init(const char *filename, const char *path, int flags, int (*classifier)(DMResource *)) +int dmres_init(const char *filename, const char *path, const int flags, int (*classifier)(DMResource *)) { // Check if we are already initialized if (dfResInitialized) @@ -882,6 +882,7 @@ dfResPath = dm_strdup((path != NULL) ? path : DMRES_DATA_PATH); dfResourcesMutex = dmCreateMutex(); + if (flags & DRF_USE_PACK) { #ifdef DMRES_PACKFS @@ -938,7 +939,7 @@ { int ret = classifier(node); if (ret != DMERR_OK) - return DMERR_INIT_FAIL; + return ret; } } diff -r 93fbce0e6591 -r 1c2ff205fa0e dmres.h --- a/dmres.h Wed Oct 03 09:19:08 2012 +0300 +++ b/dmres.h Wed Oct 03 09:29:29 2012 +0300 @@ -108,7 +108,7 @@ /* Functions */ -int dmres_init(const char *filename, const char *path, int flags, int (*classifier)(DMResource *)); +int dmres_init(const char *filename, const char *path, const int flags, int (*classifier)(DMResource *)); void dmres_close(void); void dmres_prune(int agems, int flags);