On Wed, Mar 25, 2026 at 01:54:07AM +0100, Stefano Brivio wrote:
On Mon, 23 Mar 2026 18:37:10 +1100 David Gibson
wrote: The read_all_buf() and write_all_buf() functions in util.c are primarily used for serialising data structures to a stream during migraiton. We're going to have further use for such serialisation when we add dynamic configuration updates, where we'll want to share the code with the client program.
Nit, but I'd like to make sure we're not missing anything before applying this: the "hidden sizeof()" variants seem to be gone now (thanks), but then we should drop this last sentence, unless I'm missing something.
Oops, yes. I removed the _var() ones but forgot to update the message.
Another nit below:
[...]
+++ b/serialise.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright Red Hat + * Author: David Gibson
+ */ + +#ifndef SERIALISE_H +#define SERIALISE_H + +#include + +int read_all_buf(int fd, void *buf, size_t len); +int write_all_buf(int fd, const void *buf, size_t len); + +#endif /* _SERIALISE_H */ This is SERIALISE_H, not _SERIALISE_H.
Fixed. -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson