diff --git a/NEWS b/NEWS
index 22aff768310..2d34d88a470 100644
--- a/NEWS
+++ b/NEWS
@@ -183,8 +183,8 @@ CHANGES WITH 251 in spe:
'portablectl attach --extension=' now also accepts directory paths.
- * VENDOR= and MODEL= can be set in /etc/machine-info to override the
- values gleaned from the hwdb.
+ * HARDWARE_VENDOR= and HARDWARE_MODEL= can be set in /etc/machine-info
+ to override the values gleaned from the hwdb.
* A ID_CHASSIS property can be set in the hwdb (for the DMI device
/sys/class/dmi/id) to override the chassis that is reported by
diff --git a/man/machine-info.xml b/man/machine-info.xml
index fddcfb6a6c4..4e6b72cea24 100644
--- a/man/machine-info.xml
+++ b/man/machine-info.xml
@@ -130,17 +130,19 @@
- VENDOR=
+ HARDWARE_VENDOR=
- Specifies the hardware vendor. If unspecified, the hardware vendor set in DMI
- or hwdb will be used.
+ Specifies the hardware vendor. If unspecified, the hardware vendor set in DMI or
+ hwdb7 will be
+ used.
- MODEL=
+ HARDWARE_MODEL=
Specifies the hardware model. If unspecified, the hardware model set in DMI or
- hwdb will be used.
+ hwdb7 will be
+ used.
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 10015a513bb..01ac5bb8052 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -53,8 +53,8 @@ typedef enum {
PROP_CHASSIS,
PROP_DEPLOYMENT,
PROP_LOCATION,
- PROP_VENDOR,
- PROP_MODEL,
+ PROP_HARDWARE_VENDOR,
+ PROP_HARDWARE_MODEL,
/* Read from /etc/os-release (or /usr/lib/os-release) */
PROP_OS_PRETTY_NAME,
@@ -136,8 +136,8 @@ static void context_read_machine_info(Context *c) {
"CHASSIS", &c->data[PROP_CHASSIS],
"DEPLOYMENT", &c->data[PROP_DEPLOYMENT],
"LOCATION", &c->data[PROP_LOCATION],
- "VENDOR", &c->data[PROP_VENDOR],
- "MODEL", &c->data[PROP_MODEL]);
+ "HARDWARE_VENDOR", &c->data[PROP_HARDWARE_VENDOR],
+ "HARDWARE_MODEL", &c->data[PROP_HARDWARE_MODEL]);
if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Failed to read /etc/machine-info, ignoring: %m");
@@ -563,7 +563,7 @@ static int property_get_hardware_property(
assert(reply);
assert(c);
- assert(IN_SET(prop, PROP_VENDOR, PROP_MODEL));
+ assert(IN_SET(prop, PROP_HARDWARE_VENDOR, PROP_HARDWARE_MODEL));
assert(getter);
context_read_machine_info(c);
@@ -583,7 +583,7 @@ static int property_get_hardware_vendor(
void *userdata,
sd_bus_error *error) {
- return property_get_hardware_property(reply, userdata, PROP_VENDOR, get_hardware_vendor);
+ return property_get_hardware_property(reply, userdata, PROP_HARDWARE_VENDOR, get_hardware_vendor);
}
static int property_get_hardware_model(
@@ -595,7 +595,7 @@ static int property_get_hardware_model(
void *userdata,
sd_bus_error *error) {
- return property_get_hardware_property(reply, userdata, PROP_MODEL, get_hardware_model);
+ return property_get_hardware_property(reply, userdata, PROP_HARDWARE_MODEL, get_hardware_model);
}
static int property_get_hostname(
@@ -1179,9 +1179,9 @@ static int method_describe(sd_bus_message *m, void *userdata, sd_bus_error *erro
assert_se(uname(&u) >= 0);
- if (isempty(c->data[PROP_VENDOR]))
+ if (isempty(c->data[PROP_HARDWARE_VENDOR]))
(void) get_hardware_vendor(&vendor);
- if (isempty(c->data[PROP_MODEL]))
+ if (isempty(c->data[PROP_HARDWARE_MODEL]))
(void) get_hardware_model(&model);
if (privileged) {
@@ -1206,8 +1206,8 @@ static int method_describe(sd_bus_message *m, void *userdata, sd_bus_error *erro
JSON_BUILD_PAIR("OperatingSystemPrettyName", JSON_BUILD_STRING(c->data[PROP_OS_PRETTY_NAME])),
JSON_BUILD_PAIR("OperatingSystemCPEName", JSON_BUILD_STRING(c->data[PROP_OS_CPE_NAME])),
JSON_BUILD_PAIR("OperatingSystemHomeURL", JSON_BUILD_STRING(c->data[PROP_OS_HOME_URL])),
- JSON_BUILD_PAIR("HardwareVendor", JSON_BUILD_STRING(vendor ?: c->data[PROP_VENDOR])),
- JSON_BUILD_PAIR("HardwareModel", JSON_BUILD_STRING(model ?: c->data[PROP_MODEL])),
+ JSON_BUILD_PAIR("HardwareVendor", JSON_BUILD_STRING(vendor ?: c->data[PROP_HARDWARE_VENDOR])),
+ JSON_BUILD_PAIR("HardwareModel", JSON_BUILD_STRING(model ?: c->data[PROP_HARDWARE_MODEL])),
JSON_BUILD_PAIR("HardwareSerial", JSON_BUILD_STRING(serial)),
JSON_BUILD_PAIR_CONDITION(!sd_id128_is_null(product_uuid), "ProductUUID", JSON_BUILD_ID128(product_uuid)),
JSON_BUILD_PAIR_CONDITION(sd_id128_is_null(product_uuid), "ProductUUID", JSON_BUILD_NULL)));