diff --git a/tsk/auto/auto_db.cpp b/tsk/auto/auto_db.cpp index 29f1c342f8310439a8be8c74a8fdf2bf4a8c3214..0fdfdf67090eb6468ae72143481e4f75e3f48afe 100755 --- a/tsk/auto/auto_db.cpp +++ b/tsk/auto/auto_db.cpp @@ -334,6 +334,13 @@ TskAutoDb::filterPool(const TSK_POOL_INFO * pool_info) return TSK_FILTER_CONT; } +/** +* Adds unallocated pool blocks to a new volume. +* +* @param numPool Will be updated with the number of pools processed +* +* @return Returns 0 for success, 1 for failure +*/ TSK_RETVAL_ENUM TskAutoDb::addUnallocatedPoolBlocksToDb(size_t & numPool) { @@ -359,12 +366,15 @@ TskAutoDb::addUnallocatedPoolBlocksToDb(size_t & numPool) { if (pool_info->ctype != TSK_POOL_TYPE_APFS) { continue; } + + /* Increment the count of pools found */ numPool++; - // Create the volume + /* Create the volume */ int64_t unallocVolObjId; m_db->addUnallocatedPoolVolume(pool_info->num_vols, curPoolVs, unallocVolObjId); + /* Create the unallocated space files */ TSK_FS_ATTR_RUN * unalloc_runs = tsk_pool_unallocated_runs(pool_info); TSK_FS_ATTR_RUN * current_run = unalloc_runs; vector<TSK_DB_FILE_LAYOUT_RANGE> ranges; diff --git a/tsk/auto/db_postgresql.cpp b/tsk/auto/db_postgresql.cpp index 03189f8f8b99499f10aea8e6ae0a78eeb6493917..7de8a0a987e46d1f00095aed5379983b86f2fe54 100755 --- a/tsk/auto/db_postgresql.cpp +++ b/tsk/auto/db_postgresql.cpp @@ -1054,6 +1054,11 @@ TskDbPostgreSQL::addPoolInfoAndVS(const TSK_POOL_INFO *pool_info, int64_t parObj /** * Adds the sector addresses of the pool volumes into the db. +* +* @param pool_vol The pool volume to save to the DB +* @param parObjId The ID of the parent of the pool volume (should be a volume system) +* @param objId Will be set to the object ID of the new volume +* * @returns 1 on error, 0 on success */ int @@ -1085,6 +1090,11 @@ TskDbPostgreSQL::addPoolVolumeInfo(const TSK_POOL_VOLUME_INFO* pool_vol, /** * Adds a fake volume that will hold the unallocated blocks for the pool. +* +* @param vol_index The index for the new volume (should be one higher than the number of pool volumes) +* @param parObjId The object ID of the parent volume system +* @param objId Will be set to the object ID of the new volume +* * @returns 1 on error, 0 on success */ int diff --git a/tsk/auto/db_sqlite.cpp b/tsk/auto/db_sqlite.cpp index 7db4f9c885ddf3990359bc05a9a1d0fed325b65b..79f9feca675829453fe5d461cea1a46765acbbdb 100644 --- a/tsk/auto/db_sqlite.cpp +++ b/tsk/auto/db_sqlite.cpp @@ -796,6 +796,11 @@ TskDbSqlite::addPoolInfoAndVS(const TSK_POOL_INFO *pool_info, int64_t parObjId, /** * Adds a fake volume that will hold the unallocated blocks for the pool. +* +* @param vol_index The index for the new volume (should be one higher than the number of pool volumes) +* @param parObjId The object ID of the parent volume system +* @param objId Will be set to the object ID of the new volume +* * @returns 1 on error, 0 on success */ int @@ -820,6 +825,15 @@ TskDbSqlite::addUnallocatedPoolVolume(int vol_index, int64_t parObjId, int64_t& return ret; } +/** +* Adds the sector addresses of the pool volumes into the db. +* +* @param pool_vol The pool volume to save to the DB +* @param parObjId The ID of the parent of the pool volume (should be a volume system) +* @param objId Will be set to the object ID of the new volume +* +* @returns 1 on error, 0 on success +*/ int TskDbSqlite::addPoolVolumeInfo(const TSK_POOL_VOLUME_INFO* pool_vol, int64_t parObjId, int64_t& objId)