search for: root_inum

Displaying 20 results from an estimated 41 matches for "root_inum".

2016 Aug 26
2
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...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) 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->nam...
2016 Aug 26
1
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...> >> +/* 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 lik...
2016 Aug 26
0
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...", 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 (...
2016 Aug 24
1
[PATCH] filesystem_walk: fixed root inode listing
...path, void *data) struct guestfs_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 24
0
[PATCH 1/3] New API: internal_find_inode
...G_ALLOC | TSK_FS_DIR_WALK_FLAG_UNALLOC | + TSK_FS_DIR_WALK_FLAG_RECURSE | TSK_FS_DIR_WALK_FLAG_NOORPHAN; + + ret = open_filesystem (mountable->device, &img, &fs); + if (ret < 0) + return ret; + + reply (NULL, NULL); /* Reply message. */ + + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, ifind_callback, + (void *) &inode); + if (ret == 0) + ret = send_file_end (0); /* File transfer end. */ + else + send_file_end (1); /* Cancel file transfer. */ + + fs->close (fs); + img->close (img); + + return ret; +} + /* Inspect the device...
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 20
1
Re: [PATCH v2 1/3] New API: internal_find_block
...+ TSK_FS_DIR_WALK_FLAG_RECURSE | TSK_FS_DIR_WALK_FLAG_NOORPHAN; > + > + ret = open_filesystem (mountable->device, &img, &fs); > + if (ret < 0) > + return ret; > + > + reply (NULL, NULL); /* Reply message. */ > + > + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, > + findblk_callback, (void *) &block); > + if (ret == 0) > + ret = send_file_end (0); /* File transfer end. */ > + else > + send_file_end (1); /* Cancel file transfer. */ > + > + fs->close (fs); > + img->close (img); &gt...
2016 Aug 25
1
Re: [PATCH 1/3] New API: internal_find_inode
...+ TSK_FS_DIR_WALK_FLAG_RECURSE | TSK_FS_DIR_WALK_FLAG_NOORPHAN; > + > + ret = open_filesystem (mountable->device, &img, &fs); > + if (ret < 0) > + return ret; > + > + reply (NULL, NULL); /* Reply message. */ > + > + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, ifind_callback, > + (void *) &inode); Here 'inode' is int64_t ... > + if (ret == 0) > + ret = send_file_end (0); /* File transfer end. */ > + else > + send_file_end (1); /* Cancel file transfer. */ > + > + fs->close (f...
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
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 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...t; + > > > + ret = open_filesystem (mountable->device, &img, &fs); > > > + if (ret < 0) > > > + return ret; > > > + > > > + reply (NULL, NULL); /* Reply message. */ > > > + > > > + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, fswalk_callback, > > NULL); > > > + if (ret == 0) > > > + ret = send_file_end (0); /* File transfer end. */ > > > + else > > > + send_file_end (1); /* Cancel file transfer. */ > > > + > > > + fs->close (fs); > >...
2016 Aug 26
6
[PATCH v4 0/6] New API: find_inode
...Root entry etc/systemd/. etc/systemd/.. 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 li...
2016 Aug 25
0
[PATCH v2 1/6] filesystem_walk: fixed root inode listing
...reply_with_tsk_error (const char *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
...t;%s: unknown error", funcname); } +/* 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/ge...
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
...G_ALLOC | TSK_FS_DIR_WALK_FLAG_UNALLOC | + TSK_FS_DIR_WALK_FLAG_RECURSE | TSK_FS_DIR_WALK_FLAG_NOORPHAN; + + ret = open_filesystem (mountable->device, &img, &fs); + if (ret < 0) + return ret; + + reply (NULL, NULL); /* Reply message. */ + + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, + findino_callback, (void *) &inode); + if (ret == 0) + ret = send_file_end (0); /* File transfer end. */ + else + send_file_end (1); /* Cancel file transfer. */ + + fs->close (fs); + img->close (img); + + return ret; +} + /* Inspect the devic...
2016 Aug 25
0
[PATCH v2 4/6] New API: internal_find_inode
...G_ALLOC | TSK_FS_DIR_WALK_FLAG_UNALLOC | + TSK_FS_DIR_WALK_FLAG_RECURSE | TSK_FS_DIR_WALK_FLAG_NOORPHAN; + + ret = open_filesystem (mountable->device, &img, &fs); + if (ret < 0) + return ret; + + reply (NULL, NULL); /* Reply message. */ + + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, + findino_callback, (void *) &inode); + if (ret == 0) + ret = send_file_end (0); /* File transfer end. */ + else + send_file_end (1); /* Cancel file transfer. */ + + fs->close (fs); + img->close (img); + + return ret; +} + /* Inspect the devic...
2016 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...+ TSK_FS_DIR_WALK_FLAG_RECURSE | TSK_FS_DIR_WALK_FLAG_NOORPHAN; > + > + ret = open_filesystem (mountable->device, &img, &fs); > + if (ret < 0) > + return ret; > + > + reply (NULL, NULL); /* Reply message. */ > + > + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, fswalk_callback, NULL); > + if (ret == 0) > + ret = send_file_end (0); /* File transfer end. */ > + else > + send_file_end (1); /* Cancel file transfer. */ > + > + fs->close (fs); > + img->close (img); > + > + return ret; > +} > + > +/*...
2016 Sep 17
0
[PATCH 1/4] New API: internal_find_block
...G_ALLOC | TSK_FS_DIR_WALK_FLAG_UNALLOC | + TSK_FS_DIR_WALK_FLAG_RECURSE | TSK_FS_DIR_WALK_FLAG_NOORPHAN; + + ret = open_filesystem (mountable->device, &img, &fs); + if (ret < 0) + return ret; + + reply (NULL, NULL); /* Reply message. */ + + ret = tsk_fs_dir_walk (fs, fs->root_inum, flags, + findblk_callback, (void *) &block); + if (ret == 0) + ret = send_file_end (0); /* File transfer end. */ + else + send_file_end (1); /* Cancel file transfer. */ + + fs->close (fs); + img->close (img); + + return ret; +} + + /* Inspect the dev...
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 ++++++