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

Re: [PATCH v2 1/2] tools/xenstore: move per connection read and write func hooks into a struct



On 14.05.21 18:33, Julien Grall wrote:
Hi Juergen,

On 14/05/2021 12:56, Juergen Gross wrote:
-struct connection *new_connection(connwritefn_t *write, connreadfn_t *read);
+struct connection *new_connection(const struct interface_funcs *funcs);
  struct connection *get_connection_by_id(unsigned int conn_id);
  void check_store(void);
  void corrupt(struct connection *conn, const char *fmt, ...);
@@ -254,10 +256,7 @@ void finish_daemonize(void);
  /* Open a pipe for signal handling */
  void init_pipe(int reopen_log_pipe[2]);
-int writefd(struct connection *conn, const void *data, unsigned int len);
-int readfd(struct connection *conn, void *data, unsigned int len);
-
-extern struct interface_funcs socket_funcs;
+extern const struct interface_funcs socket_funcs;
Shouldn't this be protected with #ifdef NO_SOCKETS?

Yes, I can add it.


The rest looks good to me:

Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks,

Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: application/pgp-keys

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®.