xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard
@ 2021-03-04 13:03 Andrew Cooper
  2021-03-04 13:42 ` Ian Jackson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Cooper @ 2021-03-04 13:03 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Wei Liu

This is inappropriate for the header file of a standalone library with stable
API and ABI.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <iwj@xenproject.org>
CC: Wei Liu <wl@xen.org>

Discovered when trying to actually remove the use of unstable libraries from a
trivial userspace emulator.  Current users of xendevicemodel.h inherit
__XEN_TOOLS__ from libxenctrl.h (or equiv).
---
 tools/include/xendevicemodel.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tools/include/xendevicemodel.h b/tools/include/xendevicemodel.h
index 33698d67f3..797e0c6b29 100644
--- a/tools/include/xendevicemodel.h
+++ b/tools/include/xendevicemodel.h
@@ -17,8 +17,6 @@
 #ifndef XENDEVICEMODEL_H
 #define XENDEVICEMODEL_H
 
-#ifdef __XEN_TOOLS__
-
 #include <stdint.h>
 
 #include <xen/xen.h>
@@ -377,8 +375,6 @@ int xendevicemodel_nr_vcpus(
  */
 int xendevicemodel_restrict(xendevicemodel_handle *dmod, domid_t domid);
 
-#endif /* __XEN_TOOLS__ */
-
 #endif /* XENDEVICEMODEL_H */
 
 /*
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard
  2021-03-04 13:03 [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard Andrew Cooper
@ 2021-03-04 13:42 ` Ian Jackson
  2021-03-04 14:14 ` Ian Jackson
  2021-03-04 22:24 ` Andrew Cooper
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2021-03-04 13:42 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Xen-devel, Wei Liu

Andrew Cooper writes ("[PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard"):
> This is inappropriate for the header file of a standalone library with stable
> API and ABI.

wat

> Discovered when trying to actually remove the use of unstable libraries from a
> trivial userspace emulator.  Current users of xendevicemodel.h inherit
> __XEN_TOOLS__ from libxenctrl.h (or equiv).

Release-Acked-by: Ian Jackson <iwj@xenproject.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard
  2021-03-04 13:03 [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard Andrew Cooper
  2021-03-04 13:42 ` Ian Jackson
@ 2021-03-04 14:14 ` Ian Jackson
  2021-03-04 22:24 ` Andrew Cooper
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2021-03-04 14:14 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Xen-devel, Wei Liu

Andrew Cooper writes ("[PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard"):
> This is inappropriate for the header file of a standalone library with stable
> API and ABI.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Ian Jackson <iwj@xenproject.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard
  2021-03-04 13:03 [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard Andrew Cooper
  2021-03-04 13:42 ` Ian Jackson
  2021-03-04 14:14 ` Ian Jackson
@ 2021-03-04 22:24 ` Andrew Cooper
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2021-03-04 22:24 UTC (permalink / raw)
  To: Xen-devel; +Cc: Ian Jackson, Wei Liu

On 04/03/2021 13:03, Andrew Cooper wrote:
> This is inappropriate for the header file of a standalone library with stable
> API and ABI.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Ian Jackson <iwj@xenproject.org>
> CC: Wei Liu <wl@xen.org>
>
> Discovered when trying to actually remove the use of unstable libraries from a
> trivial userspace emulator.  Current users of xendevicemodel.h inherit
> __XEN_TOOLS__ from libxenctrl.h (or equiv).
> ---

... and this patch is broken.

But CI doesn't pick it up because we've also broken the header check
scripts as part of library refactoring.

The 4.13 header checks do work, and point out that there is yet another
set of bogus __XEN_TOOLS__ ifdef in the Xen public ABI, which hides the
ioserverid_t type and (rightly) breaks the build.

Which in turn proves that the header checks (for xendevicemodel.h at
least) never ever checked anything originally, because they didn't pass
__XEN_TOOLS__ in at the top and just saw an empty file.

~Andrew



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-04 22:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 13:03 [PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard Andrew Cooper
2021-03-04 13:42 ` Ian Jackson
2021-03-04 14:14 ` Ian Jackson
2021-03-04 22:24 ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).