.

.

.

common/cli.c

#if CONFIG_IS_ENABLED(OF_CONTROL)
void cli_secure_boot_cmd(const char *cmd)
{
#ifdef CONFIG_CMDLINE
        cmd_tbl_t *cmdtp;
#endif
        int rc;

        if (!cmd) {
                printf("## Error: Secure boot command not specified\n");
                goto err;
        }

        /* Disable Ctrl-C just in case some command is used that checks it. */
        disable_ctrlc(1);

        /* Find the command directly. */
#ifdef CONFIG_CMDLINE
        cmdtp = find_cmd(cmd);
        if (!cmdtp) {
                printf("## Error: \"%s\" not defined\n", cmd);
                goto err;
        }

        /* Run the command, forcing no flags and faking argc and argv. */
        rc = (cmdtp->cmd)(cmdtp, 0, 1, (char **)&cmd);

#else
        rc = board_run_command(cmd);
#endif

        /* Shouldn't ever return from boot command. */
        printf("## Error: \"%s\" returned (code %d)\n", cmd, rc);

err:
        /*
         * Not a whole lot to do here.  Rebooting won't help much, since we'll
         * just end up right back here.  Just loop.
         */
        hang();
}
#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */

.

.

.

results matching ""

    No results matching ""