[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 19/25] tools/xenstore: use struct node_hdr in struct node



On 01.08.23 23:34, Julien Grall wrote:
Hi Juergen,

On 24/07/2023 12:02, Juergen Gross wrote:
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index c72fc0c725..404ecd0c62 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -555,6 +555,12 @@ static void initialize_fds(int *p_sock_pollfd_idx, int *ptimeout)
      }
  }
+static size_t calc_node_acc_size(struct node_hdr *hdr)

The parameter can be const.

I've changed this already in my pending V4. :-)


+{
+    return sizeof(*hdr) + hdr->num_perms * sizeof(struct xs_permissions) +
+           hdr->datalen + hdr->childlen;
+}
+

[...]

diff --git a/tools/xenstore/xenstored_core.h b/tools/xenstore/xenstored_core.h
index 9cb4c2f3eb..adf8a785fc 100644
--- a/tools/xenstore/xenstored_core.h
+++ b/tools/xenstore/xenstored_core.h
@@ -181,6 +181,7 @@ extern struct list_head connections;
   */
  struct node_hdr {
      uint64_t generation;
+#define NO_GENERATION ~((uint64_t)0)
      uint16_t num_perms;
      uint16_t datalen;
      uint32_t childlen;
@@ -197,6 +198,10 @@ struct node_account_data {
  };
  struct node {
+    /* Data direct for data base. */

I can't parse it. Did you mean 'from' rather than 'for'?

I'll change it to:

        /* Copied to/from data base. */


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.