On Wed, Apr 05, 2023 at 01:58:34PM +0200, Stefano Brivio wrote:
On Tue, 4 Apr 2023 11:46:31 +1000 David Gibson
wrote: So that we'll probably give a better error if you point it at something that's not an nstool hold control socket.
Signed-off-by: David Gibson
--- test/nstool.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/nstool.c b/test/nstool.c index 428c9c4..e995f3e 100644 --- a/test/nstool.c +++ b/test/nstool.c @@ -12,6 +12,7 @@ #include
#include #include +#include #include #include #include @@ -45,7 +46,10 @@ const struct ns_type nstypes[] = { { CLONE_NEWUTS, "uts" }, }; +#define NSTOOL_MAGIC 0x75601d75 + struct holder_info { + uint64_t magic;
Is uint64_t with just 32 bits "set" a trick to detect endianness problems (perhaps it's a common pattern I'm not aware of)?
Heh, no, that's just me having brainfade. I've extended the constant to 64-bits. -- David Gibson | 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