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

[PATCH-for-4.15] tools/libs/store: cleanup libxenstore interface



Juergen Gross writes ("[PATCH-for-4.15] tools/libs/store: cleanup libxenstore 
interface"):
> There are some internals in the libxenstore interface which should be
> removed.
> 
> Move those functions into xs_lib.c and the related definitions into
> xs_lib.h. Remove the functions from the mapfile. Add xs_lib.o to
> xenstore_client as some of the internal functions are needed there.

This seems wider in scope than I was expecting.

Reviewing it again makes me think that there are more concers than I
anticipated and I am now doubtful whether I want to take it in 4.15.


I thought at this stage we were just going to fix the
accidentally-exported symbols with improperly namespaced names.  It is
those for which I think that withdrawing them without an ABI soname
bump, in contravention of usual library ABI stability rules, will not
cause trouble in pracice.

My current thoughts are that several of these really ought not to be
withdrawn as they might cause actual trouble:

>  /* Path for various daemon things: env vars can override. */
> -const char *xs_daemon_rootdir(void);
> -const char *xs_domain_dev(void);
> -const char *xs_daemon_tdb(void);

Someone who was writing bindings might have exposed these without
knowing what they were, resulting in linkage to these symbols.

>  bool xs_strings_to_perms(struct xs_permissions *perms, unsigned int num,
>                        const char *strings);
>  
> -/* Convert permissions to a string (up to len MAX_STRLEN(unsigned int)+1). */
> -bool xs_perm_to_string(const struct xs_permissions *perm,
> -                       char *buffer, size_t buf_len);

Isn't this function potentially useful ?  It seems funny to have only
one of the conversion directions.

> +void unsanitise_value(char *out, unsigned *out_len_r, const char *in)

Is it possible to do sort this out in a more minimal way ?  Eg we
could change the name to namespace it properly.  (I haven't looked at
the code in detail and am still rather under-caffeinated so maybe I am
talking nonsense here.)

Ian.



 


Rackspace

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