search for: entry_is_dot

Displaying 20 results from an estimated 22 matches for "entry_is_dot".

2016 Aug 26
2
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...on/tsk.c > +++ b/daemon/tsk.c > @@ -48,6 +48,7 @@ static char file_type (TSK_FS_FILE *); > static int file_flags (TSK_FS_FILE *fsfile); > static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); > static int send_dirent_info (guestfs_int_tsk_dirent *); > +static int entry_is_dot(TSK_FS_FILE *); > static void reply_with_tsk_error (const char *); Since in patch #2 this forward declaration is moved, put it at the right place already in this patch. > int > @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) > CLEANUP_FREE...
2016 Aug 26
1
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...@ -48,6 +48,7 @@ static char file_type (TSK_FS_FILE *); > >> static int file_flags (TSK_FS_FILE *fsfile); > >> static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); > >> static int send_dirent_info (guestfs_int_tsk_dirent *); > >> +static int entry_is_dot(TSK_FS_FILE *); > >> static void reply_with_tsk_error (const char *); > > Since in patch #2 this forward declaration is moved, put it at the > > right place already in this patch. > > > >> int > >> @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fs...
2016 Aug 25
10
[PATCH v2 0/6] New API: find_inode
v2: - refactor logic to reduce code duplication - better functions naming Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 156 ++++++++++++++++++++++++++++++------------- generator/actions.ml
2016 Sep 15
9
[PATCH v5 0/6] New API - find_inode
v5: - small doc fix: filesystem_walk claimed '.' and '..' entries were not reported but Root is now reported as '.' - bump to 1.35.6 Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c
2016 Aug 25
0
[PATCH v2 1/6] filesystem_walk: fixed root inode listing
...8d7..6e6df6d 100644 --- a/daemon/tsk.c +++ b/daemon/tsk.c @@ -48,6 +48,7 @@ static char file_type (TSK_FS_FILE *); static int file_flags (TSK_FS_FILE *fsfile); static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); static int send_dirent_info (guestfs_int_tsk_dirent *); +static int entry_is_dot(TSK_FS_FILE *); static void reply_with_tsk_error (const char *); int @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) CLEANUP_FREE char *fname = NULL; struct guestfs_int_tsk_dirent dirent; - /* Ignore ./ and ../ */ - ret = TSK_FS_ISDOT (fsfile-&g...
2016 Sep 15
0
[PATCH v5 1/6] filesystem_walk: fixed root inode listing
...72 100644 --- a/daemon/tsk.c +++ b/daemon/tsk.c @@ -49,6 +49,7 @@ static int file_flags (TSK_FS_FILE *fsfile); static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); static int send_dirent_info (guestfs_int_tsk_dirent *); static void reply_with_tsk_error (const char *); +static int entry_is_dot(TSK_FS_FILE *); int do_internal_filesystem_walk (const mountable_t *mountable) @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) CLEANUP_FREE char *fname = NULL; struct guestfs_int_tsk_dirent dirent; - /* Ignore ./ and ../ */ - ret = TSK_FS_ISDOT...
2016 Aug 26
0
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...mon/tsk.c >> @@ -48,6 +48,7 @@ static char file_type (TSK_FS_FILE *); >> static int file_flags (TSK_FS_FILE *fsfile); >> static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); >> static int send_dirent_info (guestfs_int_tsk_dirent *); >> +static int entry_is_dot(TSK_FS_FILE *); >> static void reply_with_tsk_error (const char *); > Since in patch #2 this forward declaration is moved, put it at the > right place already in this patch. > >> int >> @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *...
2016 Aug 26
6
[PATCH v4 0/6] New API: find_inode
v4: - refactor entry_is_dot My apologies for the duplicated submission but I did not read the next e-mail. The tsk_fs_dir_walk API will list all the entries including '.' and '..' in a similar manner as for 'ls -a'. This means our callback will be called for the following entries: . <-- the Root...
2016 Aug 25
0
[PATCH v2 2/6] daemon: refactor tsk code
...ar *, 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); static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); -static int send_dirent_info (guestfs_int_tsk_dirent *); -static int entry_is_dot(TSK_FS_FILE *); static void reply_with_tsk_error (const char *); +static int entry_is_dot(TSK_FS_FILE *); int do_internal_filesystem_walk (const mountable_t *mountable) @@ -104,29 +104,44 @@ open_filesystem (const char *device, TSK_IMG_INFO **img, TSK_FS_INFO **fs) } /* Filesystem walk cal...
2016 Aug 26
6
[PATCH v3 0/6] New API: find_inode
v3: - coding style fixes - comment entry_is_dot logic Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 157 ++++++++++++++++++++++++++++++-------------...
2016 Sep 16
7
[PATCH v6 0/6] New API - find_inode
This series should be ready for merge v6: - rebase on master - changes according to last comments Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 155 ++++++++++++++++++++++++++++++-------------
2016 Sep 20
1
Re: [PATCH v2 1/3] New API: internal_find_block
...nt64_t *) data; Just dereference the pointer directly, so it will not be needed later on: const uint64_t block = * (uint64_t *) data; Or, even better, this can be done only when needed, ... > + const int flags = TSK_FS_FILE_WALK_FLAG_AONLY | TSK_FS_FILE_WALK_FLAG_SLACK; > + > + if (entry_is_dot (fsfile)) > + return TSK_WALK_CONT; > + > + blkdata.found = false; > + blkdata.block = *block; ... here: blkdata.block = * (uint64_t *) data; > + /* Retrieve block list */ > + count = tsk_fs_file_attr_getsize (fsfile); > + > + for (index = 0; index < count; i...
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 15
0
[PATCH v5 4/6] New API: internal_find_inode
...it, + * encode it into an XDR structure and send it to the library. + * Return TSK_WALK_CONT on success, TSK_WALK_ERROR on error. + */ +static TSK_WALK_RET_ENUM +findino_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + int ret = 0; + uint64_t *inode = (uint64_t *) data; + + if (entry_is_dot (fsfile)) + return TSK_WALK_CONT; + + if (*inode != fsfile->name->meta_addr) + return TSK_WALK_CONT; + + ret = send_dirent_info (fsfile, path); + + return (ret == 0) ? TSK_WALK_CONT : TSK_WALK_ERROR; +} + /* Extract the information from the entry, serialize and send it out. * Retu...
2016 Aug 25
0
[PATCH v2 4/6] New API: internal_find_inode
...it, + * encode it into an XDR structure and send it to the library. + * Return TSK_WALK_CONT on success, TSK_WALK_ERROR on error. + */ +static TSK_WALK_RET_ENUM +findino_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + int ret = 0; + uint64_t *inode = (uint64_t *) data; + + if (entry_is_dot(fsfile)) + return TSK_WALK_CONT; + + if (*inode != fsfile->name->meta_addr) + return TSK_WALK_CONT; + + ret = send_dirent_info (fsfile, path); + + return (ret == 0) ? TSK_WALK_CONT : TSK_WALK_ERROR; +} + /* Extract the information from the entry, serialize and send it out. * Retur...
2016 Sep 17
0
[PATCH 1/4] New API: internal_find_block
...indblk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + findblk_data blkdata; + const TSK_FS_ATTR *fsattr = NULL; + int ret = 0, count = 0, index = 0; + uint64_t *block = (uint64_t *) data; + const int flags = TSK_FS_FILE_WALK_FLAG_AONLY | TSK_FS_FILE_WALK_FLAG_SLACK; + + if (entry_is_dot (fsfile)) + return TSK_WALK_CONT; + + blkdata.found = 0; + blkdata.block = *block; + + /* Retrieve block list */ + 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 &a...
2016 Sep 19
0
[PATCH v2 1/3] New API: internal_find_block
...indblk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + findblk_data blkdata; + const TSK_FS_ATTR *fsattr = NULL; + int ret = 0, count = 0, index = 0; + uint64_t *block = (uint64_t *) data; + const int flags = TSK_FS_FILE_WALK_FLAG_AONLY | TSK_FS_FILE_WALK_FLAG_SLACK; + + if (entry_is_dot (fsfile)) + return TSK_WALK_CONT; + + blkdata.found = false; + blkdata.block = *block; + + /* Retrieve block list */ + count = tsk_fs_file_attr_getsize (fsfile); + + for (index = 0; index < count; index++) { + fsattr = tsk_fs_file_attr_get_idx (fsfile, index); + + if (fsattr != NUL...
2016 Sep 20
0
[PATCH v3 1/3] New API: internal_find_block
...error. + */ +static TSK_WALK_RET_ENUM +findblk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + findblk_data blkdata; + const TSK_FS_ATTR *fsattr = NULL; + int ret = 0, count = 0, index = 0; + const int flags = TSK_FS_FILE_WALK_FLAG_AONLY | TSK_FS_FILE_WALK_FLAG_SLACK; + + if (entry_is_dot (fsfile)) + return TSK_WALK_CONT; + + blkdata.found = false; + blkdata.block = * (uint64_t *) data; + + /* Retrieve block list */ + count = tsk_fs_file_attr_getsize (fsfile); + + for (index = 0; index < count; index++) { + fsattr = tsk_fs_file_attr_get_idx (fsfile, index); + + if (...
2016 Sep 19
5
[PATCH v7 0/4] New API - find_inode
v7: - Merge src/tsk.c refactoring patch with #4 of find_block series Matteo Cafasso (4): lib: logic refactoring New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 52 ++++++++++++++++++++++++++++++++++ generator/actions.ml | 21 ++++++++++++++ src/MAX_PROC_NR | 2 +- src/tsk.c | 52
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