aboutsummaryrefslogtreecommitdiff
path: root/drivers/fastboot/fb_command.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/fastboot/fb_command.c')
-rw-r--r--drivers/fastboot/fb_command.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 854d66b1..4b081668 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -41,6 +41,7 @@ static void reboot_bootloader(char *, char *);
#if CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_FORMAT)
static void oem_format(char *, char *);
#endif
+static void oem_command(char *, char *);
static const struct {
const char *command;
@@ -90,6 +91,10 @@ static const struct {
.dispatch = oem_format,
},
#endif
+ [FASTBOOT_COMMAND_OEM_COMMAND] = {
+ .command = "oem command",
+ .dispatch = oem_command,
+ },
};
/**
@@ -439,3 +444,17 @@ static void oem_format(char *cmd_parameter, char *response)
}
}
#endif
+
+/**
+ * oem_command() - Execute the OEM command
+ *
+ * @cmd_parameter: Pointer to command parameter
+ * @response: Pointer to fastboot response buffer
+ */
+static void oem_command(char *cmd_parameter, char *response)
+{
+ if (run_command(cmd_parameter, 0))
+ fastboot_fail("", response);
+ else
+ fastboot_okay(NULL, response);
+}