search for: xdr_guestfs_int_tsk_dirent

Displaying 18 results from an estimated 18 matches for "xdr_guestfs_int_tsk_dirent".

2016 Aug 25
0
[PATCH v2 2/6] daemon: refactor tsk code
...(ret == 0) ? TSK_WALK_CONT : TSK_WALK_ERROR; + /* Serialize tsk_dirent struct. */ + buf = malloc (GUESTFS_MAX_CHUNK_SIZE); + if (buf == NULL) { + perror ("malloc"); + return -1; + } - return ret; + xdrmem_create (&xdr, buf, GUESTFS_MAX_CHUNK_SIZE, XDR_ENCODE); + + ret = xdr_guestfs_int_tsk_dirent (&xdr, &dirent); + if (ret == 0) { + perror ("xdr_guestfs_int_tsk_dirent"); + return -1; + } + + len = xdr_getpos (&xdr); + + xdr_destroy (&xdr); + + /* Send serialised tsk_dirent out. */ + return send_file_write (buf, len); } /* Inspect fsfile to identify...
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 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 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 05
0
[PATCH v3 3/5] daemon: Added internal_filesystem_walk command
...ol_t ret = FALSE; + CLEANUP_FREE char *buf; + + buf = malloc (GUESTFS_MAX_CHUNK_SIZE); + if (buf == NULL) { + fprintf (stderr, "malloc: %m"); + return -1; + } + + /* Serialise tsk_dirent struct. */ + xdrmem_create (&xdr, buf, GUESTFS_MAX_CHUNK_SIZE, XDR_ENCODE); + + ret = xdr_guestfs_int_tsk_dirent(&xdr, dirent); + if (ret == FALSE) { + fprintf (stderr, "xdr_guestfs_int_tsk_dirent: %m"); + return -1; + } + + /* Resize buffer to actual length. */ + len = xdr_getpos (&xdr); + xdr_destroy (&xdr); + buf = realloc (buf, len); + if (buf == NULL) { + fprintf (st...
2016 Apr 05
10
[PATCH v3 0/5] Added filesystem_walk command
v3: - File size will be reported as - 1 if it cannot be retrieved. - Code improvements based on comments. Matteo Cafasso (5): generator: Added tsk_dirent struct configure: Added libtsk compile-time check daemon: Added internal_filesystem_walk command appliance: Added filesystem_walk command appliance: Added filesystem_walk command tests daemon/Makefile.am | 4 +-
2016 Jun 13
0
[PATCH v8 1/3] New API: internal_filesystem_walk
...+ bool_t ret = FALSE; + CLEANUP_FREE char *buf = NULL; + + buf = malloc (GUESTFS_MAX_CHUNK_SIZE); + if (buf == NULL) { + perror ("malloc"); + return -1; + } + + /* Serialise tsk_dirent struct. */ + xdrmem_create (&xdr, buf, GUESTFS_MAX_CHUNK_SIZE, XDR_ENCODE); + + ret = xdr_guestfs_int_tsk_dirent (&xdr, dirent); + if (ret == FALSE) { + perror ("xdr_guestfs_int_tsk_dirent"); + return -1; + } + len = xdr_getpos (&xdr); + + xdr_destroy (&xdr); + + /* Send serialised tsk_dirent out. */ + return send_file_write (buf, len); +} + +/* Parse TSK error and send it to...
2016 Apr 11
5
[PATCH v5 0/5] New API: filesystem_walk
v5: - fixed compile-time warning - removed unused flag enumeration - new version 1.33.19 Patch ready for review. Matteo Cafasso (5): generator: Added tsk_dirent struct configure: Added libtsk compile-time check New API: internal_filesystem_walk New API: filesystem_walk lib: Added filesystem_walk command tests daemon/Makefile.am | 4 +- daemon/tsk.c
2016 Apr 06
5
[PATCH v4 0/5] New API: filesystem_walk
v4: - Changed tsk_allocated struct field into tsk_flags. - Added optional dependency in documentation. - Use asprintf and perror instead of asprintf_nowarn and fprintf. - Ensure CLEANUP_FREE vars are initialised. - Reworked the function documentation. - Improved tests robustness. Matteo Cafasso (5): generator: Added tsk_dirent struct configure: Added libtsk compile-time check
2016 May 02
5
[PATCH v6 0/5] New API: filesystem_walk
v6: - added metadata reallocation flag in tsk_flags Certain filesystems separate file name structures and metadata ones. Therefore, deleted entries with file name structures in an unallocated state might point to metadata structures which have been reallocated to new files. A flag set to 1 is generally an indication that the information gathered from the metadata structure (file
2016 Jun 12
6
[PATCH v7 0/5] New API: filesystem_walk
v7: - iterate over output file instead of reading it into memory Instead of reading the whole output file in memory and iterating over the resulting buffer, use XDR primitives to directly iterate over the file itself. This should reduce the API memory consumption. Patch ready for review. Code available at: https://github.com/noxdafox/libguestfs/tree/filesystem_walk Matteo Cafasso
2016 Apr 05
1
Re: [PATCH v3 4/5] appliance: Added filesystem_walk command
...dirents->len * > + sizeof (*dirents->val)); > + } > + > + memset(&dirents->val[index], 0, sizeof (*dirents->val)); I think this should not be needed at all, the XDR decoding should set every field in the struct. > + ret = xdr_guestfs_int_tsk_dirent(&xdr, (guestfs_int_tsk_dirent *) Why is "(guestfs_int_tsk_dirent *)" needed? (Also, missing space.) Thanks, -- Pino Toscano
2016 Jun 15
4
[PATCH v9 0/3] New API: filesystem_walk
v9: - add missing files: java/Makefile.inc, java/com/redhat/et/libguestfs/.gitignore, gobject/Makefile.inc - reserve space in tsk_dirent struct for future usage - use int instead of bool_t type - improve API documentation Matteo Cafasso (3): New API: internal_filesystem_walk New API: filesystem_walk lib: Added filesystem_walk command tests daemon/Makefile.am
2016 Jun 13
7
[PATCH v8 0/3] New API: filesystem_walk
v8: - rebase on master - bump version to 1.33.37 - squash commits 1, 2, 3 Kept original commits messages when squashing them. Matteo Cafasso (3): New API: internal_filesystem_walk New API: filesystem_walk lib: Added filesystem_walk command tests daemon/Makefile.am | 4 +- daemon/tsk.c | 249 ++++++++++++++++++++++++++++++++++++++
2016 Apr 05
0
[PATCH v3 4/5] appliance: Added filesystem_walk command
...>len = 2 * dirents->len; + dirents->val = safe_realloc (g, dirents->val, + dirents->len * + sizeof (*dirents->val)); + } + + memset(&dirents->val[index], 0, sizeof (*dirents->val)); + ret = xdr_guestfs_int_tsk_dirent(&xdr, (guestfs_int_tsk_dirent *) + &dirents->val[index]); + if (ret == FALSE) + break; + } + + xdr_destroy (&xdr); + dirents->len = index; + + return (ret == TRUE) ? 0 : -1; +} -- 2.8.0.rc3
2016 Jun 13
0
[PATCH v8 2/3] New API: filesystem_walk
...dirents->val, + dirents->len * + sizeof (*dirents->val)); + } + + /* Clear the entry so xdr logic will allocate necessary memory. */ + memset (&dirents->val[index], 0, sizeof (*dirents->val)); + ret = xdr_guestfs_int_tsk_dirent (&xdr, (guestfs_int_tsk_dirent *) + &dirents->val[index]); + if (ret == FALSE) + break; + } + + xdr_destroy (&xdr); + dirents->len = index; + + return (ret == TRUE) ? 0 : -1; +} -- 2.8.1