From e4a9bfa2a5217b17a59d2f097a9039e0666bb85f Mon Sep 17 00:00:00 2001 From: Richard Cordovano <rcordovano@basistech.com> Date: Tue, 29 Mar 2016 17:33:01 -0400 Subject: [PATCH] Change position of device id param in TskAutoDb::addImageDetails for API consistency --- tsk/auto/auto_db.cpp | 8 ++++---- tsk/auto/tsk_case_db.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tsk/auto/auto_db.cpp b/tsk/auto/auto_db.cpp index 24aea5336..23ee066db 100644 --- a/tsk/auto/auto_db.cpp +++ b/tsk/auto/auto_db.cpp @@ -126,7 +126,7 @@ uint8_t return retval; } - if (addImageDetails(a_deviceId, a_images, a_num)) { + if (addImageDetails(a_images, a_num, a_deviceId)) { return 1; } return 0; @@ -183,7 +183,7 @@ uint8_t img_ptrs[i] = img2; } - if (addImageDetails(a_deviceId, img_ptrs, a_num)) { + if (addImageDetails(img_ptrs, a_num, a_deviceId)) { //cleanup for (int i = 0; i < a_num; ++i) { free(img_ptrs[i]); @@ -207,13 +207,13 @@ uint8_t /** * Adds image details to the existing database tables. * - * @param deviceId An ASCII-printable identifier for the device associated with the data source that is intended to be unique across multiple cases (e.g., a UUID). * @param imgPaths The paths to the image splits * @param numPaths The number of paths + * @param deviceId An ASCII-printable identifier for the device associated with the data source that is intended to be unique across multiple cases (e.g., a UUID). * @return Returns 0 for success, 1 for failure */ uint8_t -TskAutoDb::addImageDetails(const char* deviceId, const char *const imgPaths[], int numPaths) +TskAutoDb::addImageDetails(const char *const imgPaths[], int numPaths, const char* deviceId) { string md5 = ""; #if HAVE_LIBEWF diff --git a/tsk/auto/tsk_case_db.h b/tsk/auto/tsk_case_db.h index 397a2c9e9..302213302 100644 --- a/tsk/auto/tsk_case_db.h +++ b/tsk/auto/tsk_case_db.h @@ -148,7 +148,7 @@ class TskAutoDb:public TskAuto { uint32_t nextSequenceNo; } UNALLOC_BLOCK_WLK_TRACK; - uint8_t addImageDetails(const char *, const char *const images[], int); + uint8_t addImageDetails(const char *const images[], int, const char *); TSK_RETVAL_ENUM insertFileData(TSK_FS_FILE * fs_file, const TSK_FS_ATTR *, const char *path, const unsigned char *const md5, -- GitLab