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

Re: [PATCH v3 24/33] tools/xenstored: move all log-pipe handling into posix.c



Hi Juergen,

On 04/01/2024 09:00, Juergen Gross wrote:
All of the log-pipe handling is needed only when running as daemon.

Move it into posix.c. This requires to have a service function in the
main event loop for handling the related requests and one for setting
the fds[] array. Use a generic name for those functions, as socket
handling can be added to them later, too.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
V3:
- new patch
---
  tools/xenstored/core.c   | 41 ++++-------------------------------
  tools/xenstored/core.h   | 11 ++++++----
  tools/xenstored/minios.c | 14 ++++++------
  tools/xenstored/posix.c  | 46 +++++++++++++++++++++++++++++++++++++++-
  4 files changed, 64 insertions(+), 48 deletions(-)

diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c
index 7b5e1d0c0f..650c1d1574 100644
--- a/tools/xenstored/core.c
+++ b/tools/xenstored/core.c
@@ -56,7 +56,7 @@
extern xenevtchn_handle *xce_handle; /* in domain.c */
  static int xce_pollfd_idx = -1;
-static struct pollfd *fds;
+struct pollfd *fds;

The name is quite generic. So, I am not sure I like the idea to export it. How about passing 'fds' as an argument of handle_special_fds()?

This is still not very great (we have an array of "unknown" sized pass). But it is better than exporting it.

The rest LGTM.

Cheers,

--
Julien Grall



 


Rackspace

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