mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
meson: introduce PROJECT_VERSION_STR and use it in udev
This commit is contained in:
@@ -33,6 +33,8 @@ conf = configuration_data()
|
||||
conf.set_quoted('PROJECT_URL', 'https://systemd.io/')
|
||||
conf.set('PROJECT_VERSION', project_major_version,
|
||||
description : 'Numerical project version (used where a simple number is expected)')
|
||||
conf.set_quoted('PROJECT_VERSION_STR', project_major_version,
|
||||
description: 'Stringified project version (used where a simple string is expected)')
|
||||
conf.set_quoted('PROJECT_VERSION_FULL', meson.project_version(), description : 'Full project version')
|
||||
|
||||
relative_source_path = run_command('realpath',
|
||||
|
||||
@@ -293,7 +293,7 @@ int udev_ctrl_start(UdevCtrl *uctrl, udev_ctrl_handler_t callback, void *userdat
|
||||
|
||||
int udev_ctrl_send(UdevCtrl *uctrl, UdevCtrlMessageType type, const void *data) {
|
||||
UdevCtrlMessageWire ctrl_msg_wire = {
|
||||
.version = "udev-" STRINGIFY(PROJECT_VERSION),
|
||||
.version = "udev-" PROJECT_VERSION_STR,
|
||||
.magic = UDEV_CTRL_MAGIC,
|
||||
.type = type,
|
||||
};
|
||||
|
||||
@@ -20,6 +20,6 @@ int lock_main(int argc, char *argv[], void *userdata);
|
||||
|
||||
static inline int print_version(void) {
|
||||
/* Dracut relies on the version being a single integer */
|
||||
puts(STRINGIFY(PROJECT_VERSION));
|
||||
puts(PROJECT_VERSION_STR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user