Displaying 10 results from an estimated 10 matches for "attrwalk_callback".
2016 Sep 20
1
Re: [PATCH v2 1/3] New API: internal_find_block
...count = tsk_fs_file_attr_getsize (fsfile);
> +
> + for (index = 0; index < count; index++) {
> + fsattr = tsk_fs_file_attr_get_idx (fsfile, index);
> +
> + if (fsattr != NULL && fsattr->flags & TSK_FS_ATTR_NONRES)
> + tsk_fs_attr_walk (fsattr, flags, attrwalk_callback, (void*) &blkdata);
(Minor style nitpick: space missing between "void" and "*".)
Should the return value of tsk_fs_attr_walk be checked for failures,
and return TSK_WALK_ERROR in case of error?
> +/* Attribute walk, searches the given block within the FS node attribute...
2016 Sep 23
1
Re: [PATCH v3 1/3] New API: internal_find_block
...September 2016 16:19:30 CEST Matteo Cafasso wrote:
> + for (index = 0; index < count; index++) {
> + fsattr = tsk_fs_file_attr_get_idx (fsfile, index);
> +
> + if (fsattr != NULL && fsattr->flags & TSK_FS_ATTR_NONRES)
> + tsk_fs_attr_walk (fsattr, flags, attrwalk_callback, (void *) &blkdata);
The return code of tsk_fs_attr_walk must be checked.
> +/* Attribute walk, searches the given block within the FS node attributes.
> + *
> + * Return TSK_WALK_CONT on success, TSK_WALK_ERROR on error.
> + */
> +static TSK_WALK_RET_ENUM
> +attrwalk_callba...
2016 Sep 19
5
[PATCH v2 0/3] New API - find_block
v2:
- use boolean field in struct
- move refactoring to previous series
Matteo Cafasso (3):
New API: internal_find_block
New API: find_block
find_block: added API tests
daemon/tsk.c | 90 ++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 25 ++++++++++++
src/MAX_PROC_NR | 2 +-
src/tsk.c | 17 +++++++++
2016 Sep 17
0
[PATCH 1/4] New API: internal_find_block
...MG_INFO **, TSK_FS_INFO **);
static TSK_WALK_RET_ENUM fswalk_callback (TSK_FS_FILE *, const char *, void *);
static TSK_WALK_RET_ENUM findino_callback (TSK_FS_FILE *, const char *, void *);
+static TSK_WALK_RET_ENUM findblk_callback (TSK_FS_FILE *, const char *, void *);
+static TSK_WALK_RET_ENUM attrwalk_callback (TSK_FS_FILE *, TSK_OFF_T , TSK_DADDR_T , char *, size_t , TSK_FS_BLOCK_FLAG_ENUM , void *);
static int send_dirent_info (TSK_FS_FILE *, const char *);
static char file_type (TSK_FS_FILE *);
static int file_flags (TSK_FS_FILE *fsfile);
@@ -109,6 +116,36 @@ do_internal_find_inode (const mountable...
2016 Sep 19
0
[PATCH v2 1/3] New API: internal_find_block
...MG_INFO **, TSK_FS_INFO **);
static TSK_WALK_RET_ENUM fswalk_callback (TSK_FS_FILE *, const char *, void *);
static TSK_WALK_RET_ENUM findino_callback (TSK_FS_FILE *, const char *, void *);
+static TSK_WALK_RET_ENUM findblk_callback (TSK_FS_FILE *, const char *, void *);
+static TSK_WALK_RET_ENUM attrwalk_callback (TSK_FS_FILE *, TSK_OFF_T , TSK_DADDR_T , char *, size_t , TSK_FS_BLOCK_FLAG_ENUM , void *);
static int send_dirent_info (TSK_FS_FILE *, const char *);
static char file_type (TSK_FS_FILE *);
static int file_flags (TSK_FS_FILE *fsfile);
@@ -109,6 +117,36 @@ do_internal_find_inode (const mountable...
2016 Sep 20
0
[PATCH v3 1/3] New API: internal_find_block
...MG_INFO **, TSK_FS_INFO **);
static TSK_WALK_RET_ENUM fswalk_callback (TSK_FS_FILE *, const char *, void *);
static TSK_WALK_RET_ENUM findino_callback (TSK_FS_FILE *, const char *, void *);
+static TSK_WALK_RET_ENUM findblk_callback (TSK_FS_FILE *, const char *, void *);
+static TSK_WALK_RET_ENUM attrwalk_callback (TSK_FS_FILE *, TSK_OFF_T , TSK_DADDR_T , char *, size_t , TSK_FS_BLOCK_FLAG_ENUM , void *);
static int send_dirent_info (TSK_FS_FILE *, const char *);
static char file_type (TSK_FS_FILE *);
static int file_flags (TSK_FS_FILE *fsfile);
@@ -109,6 +117,35 @@ do_internal_find_inode (const mountable...
2016 Sep 20
5
[PATCH v3 0/3] New API - find_block
v3:
- fixed attribute walk callback: checking against TSK_FS_BLOCK_FLAG_RAW flag would
exclude compressed data blocks which are still important.
Yet we want to exclude sparse blocks (TSK_FS_BLOCK_FLAG_SPARSE) as they are not stored
on the disk.
Matteo Cafasso (3):
New API: internal_find_block
New API: find_block
find_block: added API tests
daemon/tsk.c | 91
2016 Oct 08
5
[PATCH v4 0/3] New API - find_block
Patch ready for merging.
v4:
- check return code of tsk_fs_attr_walk
- pass TSK_FS_FILE_WALK_FLAG_NOSPARSE as additional flag to tsk_fs_attr_walk
After discussing with TSK authors the behaviour is clear. [1]
In case of COMPRESSED blocks, the callback will be called for all the attributes no matter whether they are on disk or not (sparse). In such cases, the block address will be 0. [2]
So
2016 Sep 17
7
[PATCH 0/4] New API - find_block
This series is ready for review but requires the previous one to be merged first:
https://www.redhat.com/archives/libguestfs/2016-September/msg00101.html
The find_block API allows the User to search all the filesystem entries
referring to a given data block and returns a tsk_dirent structure
for each of them.
Use case examples:
- Check whether a block containing a deleted file has been re-used
2016 Oct 11
0
Re: [PATCH v4 0/3] New API - find_block
...n disk or not (sparse). In
> such cases, the block address will be 0. [2]
Note that the API docs say:
For compressed and sparse attributes, the address *may* be zero.
(emphasis is mine)
My concern is that, if the address in such cases is "unspecified", then
the comparisons in "attrwalk_callback" are done against a
random/unitialized value (which would be bad).
Also, if the block address would be zero, what's the point of having it
among the blocks tsk_fs_attr_walk() iterates over?
Thanks,
--
Pino Toscano