search for: meta_addr

Displaying 20 results from an estimated 38 matches for "meta_addr".

Did you mean: meta_add
2016 Aug 26
2
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...own error", funcname); > } > > +/* Check whether the entry is dot and is not Root. */ > +static int > +entry_is_dot(TSK_FS_FILE *fsfile) Ditto. > +{ > + if (TSK_FS_ISDOT (fsfile->name->name)) > + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || > + strcmp (fsfile->name->name, ".")) Simply merge the two if's into a single if (A && B) condition? Also, the strcmp is already done by TSK_FS_ISDOT, isn't it? So this should be like: if (TSK_FS_ISDOT (fsfile->name->name) && (fsf...
2016 Aug 26
1
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...er the entry is dot and is not Root. */ > >> +static int > >> +entry_is_dot(TSK_FS_FILE *fsfile) > > Ditto. > > > >> +{ > >> + if (TSK_FS_ISDOT (fsfile->name->name)) > >> + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || > >> + strcmp (fsfile->name->name, ".")) > > Simply merge the two if's into a single if (A && B) condition? > > Also, the strcmp is already done by TSK_FS_ISDOT, isn't it? > > So this should be like: > > > > if (TSK...
2016 Aug 26
0
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...gt;> >> +/* Check whether the entry is dot and is not Root. */ >> +static int >> +entry_is_dot(TSK_FS_FILE *fsfile) > Ditto. > >> +{ >> + if (TSK_FS_ISDOT (fsfile->name->name)) >> + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || >> + strcmp (fsfile->name->name, ".")) > Simply merge the two if's into a single if (A && B) condition? > Also, the strcmp is already done by TSK_FS_ISDOT, isn't it? > So this should be like: > > if (TSK_FS_ISDOT (fsfile->name-&gt...
2016 Aug 24
0
[PATCH 1/3] New API: internal_find_inode
...TSK_WALK_ERROR on error. + */ +static TSK_WALK_RET_ENUM +ifind_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + int ret = 0; + CLEANUP_FREE char *fname = NULL; + uint64_t *inode = (uint64_t *) data; + struct guestfs_int_tsk_dirent dirent; + + if (*inode != fsfile->name->meta_addr) + return TSK_WALK_CONT; + + /* Ignore ./ and ../ */ + if (TSK_FS_ISDOT (fsfile->name->name)) { + /* Root is represented as . */ + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || + strcmp (fsfile->name->name, ".")) + return TSK_W...
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 24
1
[PATCH] filesystem_walk: fixed root inode listing
...fs_int_tsk_dirent dirent; /* Ignore ./ and ../ */ - ret = TSK_FS_ISDOT (fsfile->name->name); - if (ret != 0) - return TSK_WALK_CONT; + if (TSK_FS_ISDOT (fsfile->name->name)) { + /* Root is represented as . */ + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || + strcmp (fsfile->name->name, ".")) + return TSK_WALK_CONT; + } /* Build the full relative path of the entry */ ret = asprintf (&fname, "%s%s", path, fsfile->name->name); -- 2.9.3
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 Aug 26
6
[PATCH v4 0/6] New API: find_inode
...temd/.. bin/. bin/.. <-- again the Root entry We want to return the Root entry only once. Therefore, once we know that the entry under analysis is a dot if (TSK_FS_ISDOT (fsfile->name->name)) We check whether the inode is root if (fsfile->fs_info->root_inum == fsfile->name->meta_addr) But we want to make sure is the first root entry and not the parent directory of other directories. if (STREQ(fsfile->name->name, ".") I opened up a bit the logic to make it more clear. Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code...
2016 Aug 24
6
[PATCH 0/3] New API: find_inode
The find_inode API allows the User to search all the entries referring to a given inode and returns a tsk_dirent structure for each of them. As I didn't want to change unrelated code, there is a little bit of code duplication at the moment. Plan is to refactor the logic in a dedicated set of patches. Matteo Cafasso (3): New API: internal_find_inode New API: find_inode find_inode: added
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 ++++++++++++++++++++++++++++++------------- generator/actions.ml | 21 ++++++
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 Jul 04
1
Re: [PATCH 1/2] filesystem_walk: more information into tsk_dirent
...Ignore ./ and ../ */ > @@ -122,20 +124,38 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) > return TSK_WALK_ERROR; > } > > + /* Set dirent fields */ > + memset (&dirent, 0, sizeof dirent); > + > dirent.tsk_inode = fsfile->name->meta_addr; > dirent.tsk_type = file_type (fsfile); > dirent.tsk_size = (fsfile->meta != NULL) ? fsfile->meta->size : -1; > dirent.tsk_name = fname; > dirent.tsk_flags = file_flags (fsfile); > - dirent.tsk_spare1 = dirent.tsk_spare2 = dirent.tsk_spare3 = > - dirent.t...
2016 Jul 03
4
[PATCH 0/2] More information reported by filesystem_walk
Report access, modification, status update and creation time in Unix format. Report number of links pointing to a given entry. If the entry is a symbolic link, report the path of its target. If the filesystem supports native/transparent compression, report compressed files with dedicated flag (DIRENT_COMPRESSED 0x04). Matteo Cafasso (2): filesystem_walk: more information into tsk_dirent
2016 Aug 25
0
[PATCH v2 1/6] filesystem_walk: fixed root inode listing
...*funcname) reply_with_error ("%s: unknown error", funcname); } +/* Check whether the entry is dot and is not Root. */ +static int +entry_is_dot(TSK_FS_FILE *fsfile) +{ + if (TSK_FS_ISDOT (fsfile->name->name)) + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || + strcmp (fsfile->name->name, ".")) + return 1; + + return 0; +} + int optgroup_libtsk_available (void) { -- 2.9.3
2016 Sep 15
0
[PATCH v5 1/6] filesystem_walk: fixed root inode listing
...me); } +/* Check whether the entry is dot and is not Root. + * Return 1 if it is dot, 0 otherwise or if it is the Root entry. + */ +static int +entry_is_dot (TSK_FS_FILE *fsfile) +{ + if (TSK_FS_ISDOT (fsfile->name->name)) { + if (fsfile->fs_info->root_inum == fsfile->name->meta_addr && /* Root */ + STREQ(fsfile->name->name, ".")) /* Avoid '..' 'bin/..' 'etc/..' */ + return 0; + else + return 1; + } + + return 0; +} + int optgroup_libtsk_available (void) { diff --git a/generator/actions.ml b/generator/ac...
2016 Jul 04
1
[PATCH] filesystem_walk: more information into tsk_dirent
...dirent *); static void reply_with_tsk_error (const char *); @@ -122,19 +124,24 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) return TSK_WALK_ERROR; } + /* Set dirent fields */ + memset (&dirent, 0, sizeof dirent); + dirent.tsk_inode = fsfile->name->meta_addr; dirent.tsk_type = file_type (fsfile); - dirent.tsk_size = (fsfile->meta != NULL) ? fsfile->meta->size : -1; dirent.tsk_name = fname; dirent.tsk_flags = file_flags (fsfile); - dirent.tsk_spare1 = dirent.tsk_spare2 = dirent.tsk_spare3 = - dirent.tsk_spare4 = dirent.tsk_spare5...
2016 Sep 15
0
[PATCH v5 4/6] New API: internal_find_inode
...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. * Return 0 on success, -1 on error. */ diff --git a/generator/actions.ml b/generator/actio...
2016 Aug 25
0
[PATCH v2 4/6] New API: internal_find_inode
..._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. * Return 0 on success, -1 on error. */ diff --git a/generator/actions.ml b/generator/actio...
2016 Aug 25
0
[PATCH v2 2/6] daemon: refactor tsk code
...et = asprintf (&fname, "%s%s", path, fsfile->name->name); if (ret < 0) { perror ("asprintf"); - return TSK_WALK_ERROR; + return -1; } - /* Set dirent fields */ - memset (&dirent, 0, sizeof dirent); - dirent.tsk_inode = fsfile->name->meta_addr; dirent.tsk_type = file_type (fsfile); dirent.tsk_name = fname; @@ -134,10 +149,27 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) file_metadata (fsfile->meta, &dirent); - ret = send_dirent_info (&dirent); - ret = (ret == 0) ? TSK_WALK_CONT : TSK_WAL...
2016 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...Q%Q", path, fsfile->name->name); Why the quoting? We don't quote results in similar APIs (e.g. readdir). > + if (ret < 0) { > + fprintf (stderr, "asprintf: %m"); > + return TSK_WALK_ERROR; > + } > + > + dirent.tsk_inode = fsfile->name->meta_addr; > + dirent.tsk_type = file_type (fsfile); > + dirent.tsk_size = (fsfile->meta != NULL) ? fsfile->meta->size : 0; If 'meta' is null, then I guess the size should be -1 to indicate it was not available; otherwise, there is no difference between an empty file, and a file who...