mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-09 04:20:05 +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);
|
return g_variant_new_string(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_strcmp0(property_name, "HostSecurityId") == 0)
|
if (g_strcmp0(property_name, "HostSecurityId") == 0) {
|
||||||
return g_variant_new_string(fu_engine_get_host_security_id(priv->engine));
|
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)
|
if (g_strcmp0(property_name, "Interactive") == 0)
|
||||||
return g_variant_new_boolean(isatty(fileno(stdout)) != 0);
|
return g_variant_new_boolean(isatty(fileno(stdout)) != 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user