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

Re: [PATCH-for-4.15 V2] tools/libs/store: tidy up libxenstore interface



On 24.03.21 12:42, Andrew Cooper wrote:
On 24/03/2021 11:30, Juergen Gross wrote:
xenstore_lib.h is in need to be tidied up a little bit:

- the definition of struct xs_tdb_record_hdr shouldn't be here
- some symbols are not namespaced correctly

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
V2: minimal variant (Ian Jackson)
---
  tools/include/xenstore_lib.h     | 17 ++++-------------
  tools/libs/store/libxenstore.map |  6 +++---
  tools/libs/store/xs.c            | 12 ++++++------
  tools/xenstore/utils.h           | 11 +++++++++++
  tools/xenstore/xenstore_client.c | 12 ++++++------
  5 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/tools/include/xenstore_lib.h b/tools/include/xenstore_lib.h
index 4c9b6d1685..f74ad7024b 100644
--- a/tools/include/xenstore_lib.h
+++ b/tools/include/xenstore_lib.h
@@ -43,15 +43,6 @@ struct xs_permissions
        enum xs_perm_type perms;

^ This enum is still a ABI problem, as it has implementation defined
size.  The containing struct is used by xs_perm_to_string().

Substituting for int is probably the easiest option, because no amount
of trickery with the enum values themselves can prevent the compiler
deciding to use a long or larger for the object.

Switching to unsigned int and replacing the enum values with #defines
seems to be the way to go, as the enum values are basically bit mask
values.


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