mas01cr@400: #include "audioDB.h" mas01cr@400: extern "C" { mas01cr@400: #include "audioDB_API.h" mas01cr@401: #include "audioDB-internals.h" mas01cr@400: } mas01cr@400: mas01cr@400: int audiodb_power(adb_t *adb) { mas01cr@400: /* FIXME: we should probably include in adb_t information about mas01cr@400: * which mode (O_RDONLY|O_RDWR) the database was opened, so that we mas01cr@400: * can check that it's writeable. */ mas01cr@400: if(adb->header->length > 0) { mas01cr@400: return 1; mas01cr@400: } mas01cr@400: mas01cr@400: adb->header->flags |= O2_FLAG_POWER; mas01cr@400: return audiodb_sync_header(adb); mas01cr@400: }