search for: guestfs_impl_filesystem_walk

Displaying 20 results from an estimated 29 matches for "guestfs_impl_filesystem_walk".

2016 Dec 11
3
[PATCH 0/2] generic function for temporary path generation
Cosmetic change as suggested in this previous patch: https://www.redhat.com/archives/libguestfs/2016-November/msg00111.html Matteo Cafasso (2): lib: generic function for temporary path generation lib: use guestfs_int_make_temp_path to generate temporary files src/drives.c | 5 ++--- src/file.c | 22 +++++++++------------- src/guestfs-internal.h | 1 + src/journal.c
2016 Dec 11
0
[PATCH 2/2] lib: use guestfs_int_make_temp_path to generate temporary files
.../tsk.c @@ -36,7 +36,6 @@ static struct guestfs_tsk_dirent_list *parse_dirent_file (guestfs_h *, const char *); static int deserialise_dirent_list (guestfs_h *, FILE *, struct guestfs_tsk_dirent_list *); -static char *make_temp_file (guestfs_h *, const char *); struct guestfs_tsk_dirent_list * guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) @@ -44,7 +43,7 @@ guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) int ret = 0; CLEANUP_UNLINK_FREE char *tmpfile = NULL; - tmpfile = make_temp_file (g, "filesystem_walk"); + tmpfile = guestfs_int_make_temp_path (g, "fi...
2016 Mar 29
3
[PATCH 0/2] added filesystem_walk API
The filesystem_walk API parses the FS internals of a partition and returns a list of all the files and directories contained within. It list deleted files and directories as well. For each node, it reports its relative path, its inode and its allocation status. This is the end user API for inspecting a disk partition content. The command can handle filenames with special characters. Example
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 Apr 04
2
Re: [PATCH v2 4/5] appliance: Added filesystem_walk command
...s_h *g, char *buf, size_t bufsize, > + struct guestfs_tsk_dirent_list **dirents); > +static int deserialise_dirent (guestfs_h *g, XDR *xdrs, > + struct guestfs_tsk_dirent *dirent); > + > +struct guestfs_tsk_dirent_list * > +guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) > +{ > + int ret = 0; > + size_t size = 0; > + CLEANUP_FREE char *buf = NULL; > + CLEANUP_UNLINK_FREE char *tmpfile = NULL; > + > + ret = guestfs_int_lazy_make_tmpdir (g); > + if (ret < 0) > + return NULL; > + > + t...
2016 Sep 17
0
[PATCH 4/4] TSK: small refactoring
...le (guestfs_h *, FILE *); +static struct guestfs_tsk_dirent_list *parse_dirent_file (guestfs_h *, const char *); static int deserialise_dirent_list (guestfs_h *, FILE *, struct guestfs_tsk_dirent_list *); +static char *make_temp_file (guestfs_h *, const char *); struct guestfs_tsk_dirent_list * guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) { int ret = 0; - CLEANUP_FCLOSE FILE *fp = NULL; CLEANUP_UNLINK_FREE char *tmpfile = NULL; - ret = guestfs_int_lazy_make_tmpdir (g); - if (ret < 0) - return NULL; - - tmpfile = safe_asprintf (g, "%s/filesystem_walk%d", g->tmpdir,...
2016 Apr 05
1
Re: [PATCH v3 4/5] appliance: Added filesystem_walk command
...t guestfs_tsk_dirent_list *parse_filesystem_walk (guestfs_h *, char *, size_t ); Extra space at the end. > +int deserialise_dirent_list (guestfs_h *, char *, size_t , struct guestfs_tsk_dirent_list *); deserialise_dirent_list can be static. > + > +struct guestfs_tsk_dirent_list * > +guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) > +{ > + int ret = 0; > + size_t size = 0; > + CLEANUP_FREE char *buf = NULL; > + CLEANUP_UNLINK_FREE char *tmpfile = NULL; > + > + ret = guestfs_int_lazy_make_tmpdir (g); > + if (ret < 0) > + return NULL; > + > + t...
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 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 entry etc/. etc/.. <-- again the Root entry etc/systemd/.
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 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 Apr 05
0
[PATCH v3 4/5] appliance: Added filesystem_walk command
...s-internal-all.h" +#include "guestfs-internal-actions.h" + +static struct guestfs_tsk_dirent_list *parse_filesystem_walk (guestfs_h *, char *, size_t ); +int deserialise_dirent_list (guestfs_h *, char *, size_t , struct guestfs_tsk_dirent_list *); + +struct guestfs_tsk_dirent_list * +guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) +{ + int ret = 0; + size_t size = 0; + CLEANUP_FREE char *buf = NULL; + CLEANUP_UNLINK_FREE char *tmpfile = NULL; + + ret = guestfs_int_lazy_make_tmpdir (g); + if (ret < 0) + return NULL; + + tmpfile = safe_asprintf (g, "%s/filesystem_walk%d&q...
2016 Mar 29
0
[PATCH 1/2] added filesystem_walk API
...tfs_tsk_node *node_info); +static size_t read_file(guestfs_h *g, const char *path, char **dest); +static struct guestfs_tsk_node_list * +parse_filesystem_walk0 (guestfs_h *g, char *buf, size_t bufsize); +static void free_nodes(struct guestfs_tsk_node_list *nodes); + +struct guestfs_tsk_node_list * +guestfs_impl_filesystem_walk(guestfs_h *g, const char *mountable) +{ + size_t size = 0; + + CLEANUP_FREE char *buf = NULL; + CLEANUP_UNLINK_FREE char *tmpfile = NULL; + + if (guestfs_int_lazy_make_tmpdir (g) == -1) + return NULL; + + tmpfile = safe_asprintf(g, "%s/filesystem_walk%d", g->tmpdir, ++g->uni...
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 Apr 04
0
Re: [PATCH v2 4/5] appliance: Added filesystem_walk command
...ize, > > + struct guestfs_tsk_dirent_list **dirents); > > +static int deserialise_dirent (guestfs_h *g, XDR *xdrs, > > + struct guestfs_tsk_dirent *dirent); > > + > > +struct guestfs_tsk_dirent_list * > > +guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) > > +{ > > + int ret = 0; > > + size_t size = 0; > > + CLEANUP_FREE char *buf = NULL; > > + CLEANUP_UNLINK_FREE char *tmpfile = NULL; > > + > > + ret = guestfs_int_lazy_make_tmpdir (g); > > + if (ret < 0)...
2016 Apr 03
0
[PATCH v2 4/5] appliance: Added filesystem_walk command
...eserialise_dirent_list (guestfs_h *g, char *buf, size_t bufsize, + struct guestfs_tsk_dirent_list **dirents); +static int deserialise_dirent (guestfs_h *g, XDR *xdrs, + struct guestfs_tsk_dirent *dirent); + +struct guestfs_tsk_dirent_list * +guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) +{ + int ret = 0; + size_t size = 0; + CLEANUP_FREE char *buf = NULL; + CLEANUP_UNLINK_FREE char *tmpfile = NULL; + + ret = guestfs_int_lazy_make_tmpdir (g); + if (ret < 0) + return NULL; + + tmpfile = safe_asprintf (g, "%s/filesystem_walk%d&q...
2016 Jun 13
0
[PATCH v8 2/3] New API: filesystem_walk
...quot;guestfs-internal-all.h" +#include "guestfs-internal-actions.h" + +static struct guestfs_tsk_dirent_list *parse_filesystem_walk (guestfs_h *, FILE *); +static int deserialise_dirent_list (guestfs_h *, FILE *, struct guestfs_tsk_dirent_list *); + +struct guestfs_tsk_dirent_list * +guestfs_impl_filesystem_walk (guestfs_h *g, const char *mountable) +{ + int ret = 0; + CLEANUP_FCLOSE FILE *fp = NULL; + CLEANUP_UNLINK_FREE char *tmpfile = NULL; + + ret = guestfs_int_lazy_make_tmpdir (g); + if (ret < 0) + return NULL; + + tmpfile = safe_asprintf (g, "%s/filesystem_walk%d", g->tmpdir,...
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 03
7
[PATCH v2 0/5] Added filesystem_walk command
v2: - Increased the amount of collected information from the FS content. - Moved filesystem_walk0 as internal command. - Code improvement based on comments. - Adhere to project's coding style. - Better command documentation. - More robust tests. Patch ready for review, code available at: https://github.com/noxdafox/libguestfs/tree/filesystem_walk Matteo Cafasso (5): generator: