Displaying 10 results from an estimated 10 matches for "xdr_u_long".
2010 Jun 01
0
Compiling Samba 3.0.37 --with-afs (Steve Linehan)
...r/include/rpc/xdr.h:312: error: previous declaration of ?xdr_array? was
here
/usr/include/rx/xdr_prototypes.h:44: error: conflicting types for ?xdr_long?
/usr/include/rpc/xdr.h:292: error: previous declaration of ?xdr_long? was
here
/usr/include/rx/xdr_prototypes.h:45: error: conflicting types for
?xdr_u_long?
/usr/include/rpc/xdr.h:293: error: previous declaration of ?xdr_u_long? was
here
/usr/include/rx/xdr_prototypes.h:46: error: conflicting types for ?xdr_int?
/usr/include/rpc/xdr.h:290: error: previous declaration of ?xdr_int? was
here
/usr/include/rx/xdr_prototypes.h:47: error: conflicting types f...
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 Mar 29
0
[PATCH 1/2] added filesystem_walk0 API
...E char *buf;
+
+ if ((buf = malloc(GUESTFS_MAX_CHUNK_SIZE)) == NULL) {
+ reply_with_perror ("malloc");
+ return -1;
+ }
+
+ /* Serialise tsk_node struct. */
+ len = strlen(node_info->tsk_name) + 1;
+
+ xdrmem_create(&xdr, buf, GUESTFS_MAX_CHUNK_SIZE, XDR_ENCODE);
+ if (!xdr_u_long(&xdr, &len))
+ return -1;
+ if (!xdr_string(&xdr, &node_info->tsk_name, len))
+ return -1;
+ if (!xdr_uint64_t(&xdr, &node_info->tsk_inode))
+ return -1;
+ if (!xdr_uint32_t(&xdr, &node_info->tsk_allocated))
+ return -1;
+
+ /* Resize buffer...
2016 Mar 29
0
[PATCH 1/2] added filesystem_walk API
...truct guestfs_tsk_node));
+
+ return nodes;
+}
+
+/* Parse a single XDR encoded node_info.
+ * Return 0 on success, -1 on error.
+ */
+static int
+deserialise_inode_info
+(guestfs_h *g, XDR *xdrs, struct guestfs_tsk_node *node_info)
+{
+ size_t len = 0;
+ CLEANUP_FREE char *buf = NULL;
+
+ if (!xdr_u_long(xdrs, &len))
+ return -1;
+
+ buf = safe_malloc(g, len);
+
+ if (!xdr_string(xdrs, &buf, len))
+ return -1;
+ if (!xdr_uint64_t(xdrs, &node_info->tsk_inode))
+ return -1;
+ if (!xdr_uint32_t(xdrs, &node_info->tsk_allocated))
+ return -1;
+
+ node_info->tsk_...
2016 Apr 03
0
[PATCH v2 4/5] appliance: Added filesystem_walk command
...= NULL;
+
+ /* Deserialise tsk_dirent struct. */
+ if (!xdr_uint64_t (xdrs, &dirent->tsk_inode))
+ return -1;
+ if (!xdr_char (xdrs, &dirent->tsk_type))
+ return -1;
+ if (!xdr_int64_t (xdrs, &dirent->tsk_size))
+ return -1;
+
+ /* Deserialise filename. */
+ if (!xdr_u_long (xdrs, &len))
+ return -1;
+ buf = safe_malloc (g, len);
+ if (!xdr_string (xdrs, &buf, len))
+ return -1;
+ dirent->tsk_name = safe_strndup(g, buf, len);
+
+ if (!xdr_uint32_t (xdrs, &dirent->tsk_allocated))
+ return -1;
+
+ return 0;
+}
--
2.8.0.rc3
2016 Mar 29
5
[PATCH 0/2] added filesystem_walk0 low level API
The filesystem_walk0 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.
The output is serialised in XDR format and written to the given file.
The command is similar to The Sleuth Kit "fls -rp
2016 Apr 03
0
[PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...if (!xdr_uint64_t (&xdr, &dirent->tsk_inode))
+ return -1;
+ if (!xdr_char (&xdr, &dirent->tsk_type))
+ return -1;
+ if (!xdr_int64_t (&xdr, &dirent->tsk_size))
+ return -1;
+
+ /* Serialise filename. */
+ len = strlen (dirent->tsk_name) + 1;
+ if (!xdr_u_long (&xdr, &len))
+ return -1;
+ if (!xdr_string (&xdr, &dirent->tsk_name, len))
+ return -1;
+
+ if (!xdr_uint32_t (&xdr, &dirent->tsk_allocated))
+ return -1;
+
+ /* Resize buffer to actual length. */
+ len = xdr_getpos (&xdr);
+ xdr_destroy (&xdr);...
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:
2016 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...tsk_inode))
> + return -1;
> + if (!xdr_char (&xdr, &dirent->tsk_type))
> + return -1;
> + if (!xdr_int64_t (&xdr, &dirent->tsk_size))
> + return -1;
> +
> + /* Serialise filename. */
> + len = strlen (dirent->tsk_name) + 1;
> + if (!xdr_u_long (&xdr, &len))
> + return -1;
> + if (!xdr_string (&xdr, &dirent->tsk_name, len))
> + return -1;
> +
> + if (!xdr_uint32_t (&xdr, &dirent->tsk_allocated))
> + return -1;
> +
> + /* Resize buffer to actual length. */
> + len = xdr_...
2016 Apr 04
0
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...t; + if (!xdr_char (&xdr, &dirent->tsk_type))
> > + return -1;
> > + if (!xdr_int64_t (&xdr, &dirent->tsk_size))
> > + return -1;
> > +
> > + /* Serialise filename. */
> > + len = strlen (dirent->tsk_name) + 1;
> > + if (!xdr_u_long (&xdr, &len))
> > + return -1;
> > + if (!xdr_string (&xdr, &dirent->tsk_name, len))
> > + return -1;
> > +
> > + if (!xdr_uint32_t (&xdr, &dirent->tsk_allocated))
> > + return -1;
> > +
> > + /* Resize buffer...