Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
edd0f71e
Commit
edd0f71e
authored
11 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
Internal method to return names of images in IMG_INFO
parent
c6373b7c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tsk/img/img_open.c
+49
-0
49 additions, 0 deletions
tsk/img/img_open.c
tsk/img/tsk_img_i.h
+3
-0
3 additions, 0 deletions
tsk/img/tsk_img_i.h
with
52 additions
and
0 deletions
tsk/img/img_open.c
+
49
−
0
View file @
edd0f71e
...
@@ -418,3 +418,52 @@ tsk_img_close(TSK_IMG_INFO * a_img_info)
...
@@ -418,3 +418,52 @@ tsk_img_close(TSK_IMG_INFO * a_img_info)
}
}
a_img_info
->
close
(
a_img_info
);
a_img_info
->
close
(
a_img_info
);
}
}
/**
* \internal
* Return the list of names for this open images.
* This is sort of a hack implementation and is internal only at this
* point. Returns pointers into the IMG_INFO structs and should not be
* modified or freed.
* @param a_img_info Image to pull names from
* @param a_num_imgs Will contain number of elements in the return array.
* @returns List of names.
*/
const
TSK_TCHAR
**
tsk_img_get_names
(
TSK_IMG_INFO
*
a_img_info
,
int
*
a_num_imgs
)
{
if
(
a_img_info
==
NULL
)
{
tsk_error_reset
();
tsk_error_set_errno
(
TSK_ERR_IMG_ARG
);
tsk_error_set_errstr
(
"tsk_img_get_names: IMG_INFO is NULL"
);
return
NULL
;
}
if
(
a_num_imgs
==
NULL
)
{
tsk_error_reset
();
tsk_error_set_errno
(
TSK_ERR_IMG_ARG
);
tsk_error_set_errstr
(
"tsk_img_get_names: a_num_imgs is NULL"
);
return
NULL
;
}
*
a_num_imgs
=
0
;
switch
(
a_img_info
->
itype
)
{
case
TSK_IMG_TYPE_RAW
:
{
IMG_RAW_INFO
*
raw_info
=
(
IMG_RAW_INFO
*
)
a_img_info
;
*
a_num_imgs
=
raw_info
->
num_img
;
return
raw_info
->
images
;
}
#if HAVE_LIBEWF
case
TSK_IMG_TYPE_EWF_EWF
:
{
IMG_EWF_INFO
*
ewf_info
=
(
IMG_EWF_INFO
*
)
a_img_info
;
*
a_num_imgs
=
ewf_info
->
num_imgs
;
return
ewf_info
->
images
;
}
break
;
#endif
default:
return
NULL
;
}
}
This diff is collapsed.
Click to expand it.
tsk/img/tsk_img_i.h
+
3
−
0
View file @
edd0f71e
...
@@ -40,6 +40,9 @@ extern void tsk_img_free(void *);
...
@@ -40,6 +40,9 @@ extern void tsk_img_free(void *);
extern
TSK_TCHAR
**
tsk_img_findFiles
(
const
TSK_TCHAR
*
a_startingName
,
extern
TSK_TCHAR
**
tsk_img_findFiles
(
const
TSK_TCHAR
*
a_startingName
,
int
*
a_numFound
);
int
*
a_numFound
);
extern
const
TSK_TCHAR
**
tsk_img_get_names
(
TSK_IMG_INFO
*
a_img_info
,
int
*
a_num_imgs
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment