#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
+#include <locale.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/reboot.h>
static bool lockdown_active(void)
{
+#if defined(SIGNED_BOOT) && defined(HARD_LOCKDOWN)
+ return true;
+#else
bool lockdown = false;
if (access(LOCKDOWN_FILE, F_OK) != -1)
lockdown = true;
return lockdown;
+#endif
}
static void cui_start(void)
* If this option was faked above move the context under
* the item so it is cleaned up later in cui_plugins_remove().
*/
- if (strncmp(cod->opt->id, "dummy", strlen("dummy") == 0 &&
- cod->dev->type == DEVICE_TYPE_UNKNOWN)) {
+ if (strcmp(cod->opt->id, "dummy") == 0 &&
+ cod->dev->type == DEVICE_TYPE_UNKNOWN) {
talloc_steal(item, cod->dev);
talloc_steal(item, cod->opt);
}
m = pmenu_init(cui, 2, cui_plugin_menu_exit);
m->scr.frame.ltitle = talloc_asprintf(m, _("Petitboot Plugins"));
- m->scr.frame.rtitle = talloc_asprintf(m, NULL);
+ m->scr.frame.rtitle = talloc_asprintf(m, "%s", "");
m->scr.frame.help = talloc_strdup(m,
_("Enter=install, e=details, x=exit, h=help"));
m->scr.frame.status = talloc_asprintf(m,
int cui_run(struct cui *cui)
{
- assert(main);
+ assert(cui);
+ assert(cui->main);
cui->current = &cui->main->scr;
cui->default_item = 0;