tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard
PATCH 1/1 tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard
This is inappropriate for the header file of a standalone library with stable API and ABI.
---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
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(-)
tools/include/xendevicemodel.h +0 -4
@@ -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 */ /*
Signature · 1 line
2.11.0
Andrew Cooper writes ("[PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard"):
Quoted 2 lines
This is inappropriate for the header file of a standalone library with stable API and ABI.
wat
Quoted 3 lines
Discovered when trying to actually remove the use of unstable libraries from a trivial userspace emulator. Current users of
xendevicemodel.hinherit__XEN_TOOLS__fromlibxenctrl.h(or equiv).
Andrew Cooper writes ("[PATCH for-4.15] tools/libxendevicemodel: Strip __XEN_TOOLS__ header guard"):
Quoted 4 lines
This is inappropriate for the header file of a standalone library with stable API and ABI.
Signed-off-by Andrew Cooper <[email protected]>
Quoted 4 lines · Andrew Cooper
This is inappropriate for the header file of a standalone library with stable API and ABI.
Signed-off-by Andrew Cooper <[email protected]>
Quoted 8 lines
---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>Discovered when trying to actually remove the use of unstable libraries from a trivial userspace emulator. Current users of
xendevicemodel.hinherit__XEN_TOOLS__fromlibxenctrl.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