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.

+{
+       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'?

+       struct node_hdr hdr;
+
+       /* Xenstore path. */
        const char *name;
        /* Name used to access data base. */
        const char *db_name;
@@ -204,20 +209,13 @@ struct node {
        /* Parent (optional) */
        struct node *parent;
Cheers,

--
Julien Grall

Reply via email to