+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
"container\0"
"desktop\0"
"laptop\0"
+ "convertible\0"
"server\0"
"tablet\0"
"handset\0"
case 0x1E: /* Tablet */
return "tablet";
+
+ case 0x1F: /* Convertible */
+ case 0x20: /* Detachable */
+ return "convertible";
}
try_acpi:
/* ... and the ultimate fallback */
else
- hn = "localhost";
+ hn = FALLBACK_HOSTNAME;
if (sethostname_idempotent(hn) < 0)
return -errno;
continue;
}
- t = strjoin(name[p], "=", c->data[p], NULL);
+ t = strjoin(name[p], "=", c->data[p]);
if (!t)
return -ENOMEM;
name = c->data[PROP_STATIC_HOSTNAME];
if (isempty(name))
- name = "localhost";
+ name = FALLBACK_HOSTNAME;
if (!hostname_is_valid(name, false))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid hostname '%s'", name);