<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 05/04/16 19:33, Pino Toscano wrote:<br>
    <blockquote
      cite="mid:1487631.oTn63CUgmG@pendragon.usersys.redhat.com"
      type="cite">
      <pre wrap="">On Tuesday 05 April 2016 18:47:28 Matteo Cafasso wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">The tsk_dirent struct contains the information gathered via TSK APIs.

The struct contains the following fields:
 * tsk_inode: inode of a file
 * tsk_type: type of file such as for dirwalk command
 * tsk_size: file size in bytes
 * tsk_name: path relative to its disk partition
 * tsk_allocated: whether the file has been deleted

Signed-off-by: Matteo Cafasso <a class="moz-txt-link-rfc2396E" href="mailto:noxdafox@gmail.com"><noxdafox@gmail.com></a>
---
 generator/structs.ml | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/generator/structs.ml b/generator/structs.ml
index 6017ba6..d986fd9 100644
--- a/generator/structs.ml
+++ b/generator/structs.ml
@@ -442,8 +442,20 @@ let structs = [
     "im_device", FString;
     "im_volume", FString;
     ];
-    s_camel_name = "InternalMountable";
-  };
+    s_camel_name = "InternalMountable" };
</pre>
      </blockquote>
      <pre wrap="">
Unneeded change.

</pre>
      <blockquote type="cite">
        <pre wrap="">+  (* The Sleuth Kit directory entry information. *)
+  { defaults with
+    s_name = "tsk_dirent";
+    s_cols = [
+    "tsk_inode", FUInt64;
+    "tsk_type", FChar;
+    "tsk_size", FInt64;
+    "tsk_name", FString;
+    "tsk_allocated", FUInt32;
</pre>
      </blockquote>
      <pre wrap="">
Once added to the public API, a struct cannot be extended anymore
(it would break the ABI).  IMHO it would make more sense to have
a tsk_flags instead of tsk_allocated, documenting the values of the
flags/bits set: this way, adding a new simple boolean flag won't
require a new tsk_dirent2 (see e.g. the application2 struct).</pre>
    </blockquote>
    <br>
    The application2 structs shows pretty well the issue but does not
    have any bitwise flag.<br>
    Is there an example I could use as a reference? Especially I'd like
    to see how flags are exposed and documented.<br>
    <br>
    <blockquote
      cite="mid:1487631.oTn63CUgmG@pendragon.usersys.redhat.com"
      type="cite">
      <pre wrap="">

Thanks,
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Libguestfs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Libguestfs@redhat.com">Libguestfs@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libguestfs">https://www.redhat.com/mailman/listinfo/libguestfs</a></pre>
    </blockquote>
    <br>
  </body>
</html>