mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-04 01:04:43 +00:00
trivial: Fix a critical warning if compiled without HSI support
This commit is contained in:
parent
03f8238cf8
commit
c9e58e2cd9
@ -1820,8 +1820,18 @@ fu_main_daemon_get_property(GDBusConnection *connection_,
|
||||
return g_variant_new_string(tmp);
|
||||
}
|
||||
|
||||
if (g_strcmp0(property_name, "HostSecurityId") == 0)
|
||||
return g_variant_new_string(fu_engine_get_host_security_id(priv->engine));
|
||||
if (g_strcmp0(property_name, "HostSecurityId") == 0) {
|
||||
const gchar *tmp = fu_engine_get_host_security_id(priv->engine);
|
||||
if (tmp == NULL) {
|
||||
g_set_error(error,
|
||||
G_DBUS_ERROR,
|
||||
G_DBUS_ERROR_NOT_SUPPORTED,
|
||||
"failed to get daemon property %s",
|
||||
property_name);
|
||||
return NULL;
|
||||
}
|
||||
return g_variant_new_string(tmp);
|
||||
}
|
||||
|
||||
if (g_strcmp0(property_name, "Interactive") == 0)
|
||||
return g_variant_new_boolean(isatty(fileno(stdout)) != 0);
|
||||
|
Loading…
Reference in New Issue
Block a user