You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libnvme: commit pre-generated accessor files and simplify build
The accessor functions (getters/setters for nvme_path, nvme_ns,
nvme_ctrl, nvme_subsystem, nvme_host, nvme_fabric_options) were
previously generated at build time by a custom_target in Meson.
They are now committed to the source tree and treated as
maintainer-generated source files, similar to how the Linux kernel
and systemd handle infrequently-changing generated code.
Changes:
- Commit accessors.h, accessors.c, accessors.ld to the source tree
- Remove the custom_target that ran the generator on every build;
generate-accessors is no longer compiled during a normal build
- Add accessors.c to the sources list and accessors.h to
install_headers() alongside their sibling files in
libnvme/src/meson.build
- Remove accessors_dep (was only needed to forward the custom_target
outputs; plain files don't require this indirection)
- Enhance generate-accessors.c to emit mechanical Doxygen stubs in
accessors.h, covering all three member kinds: value types, dynamic
char * (with NULL/copy semantics), and fixed char arrays
- Add update-accessors.sh: atomically regenerates accessors.h and
accessors.c when content changes, and reports symbol additions and
removals against accessors.ld without overwriting it
- Add a Meson run_target and Makefile target 'update-accessors' for
on-demand regeneration: make update-accessors
- Keep accessors.ld manually maintained; its version section labels
(e.g. LIBNVME_ACCESSORS_3_0) must be assigned by the maintainer to
preserve ABI compatibility
- Add .github/workflows/check-accessors.yml to fail CI when the
committed accessor files drift from the generator output
- Update README.md with a developer guide covering regeneration,
accessors.ld maintenance, and the ABI versioning convention
- Fix three stale test reference files that were missing dhchap_ctrl_key
from their expected JSON output following an earlier json.c update
Signed-off-by: Martin Belanger <[email protected]>
0 commit comments