]> git.sur5r.net Git - u-boot/blobdiff - include/fastboot.h
fastboot: Rename fb_set_reboot_flag to fastboot_set_reboot_flag
[u-boot] / include / fastboot.h
index 009f1a72e10fb287fa721cac91028b4db065371c..816e71b4d0d5d77caa7403f8f0d1dd02bca80ece 100644 (file)
 /* The 64 defined bytes plus \0 */
 #define FASTBOOT_RESPONSE_LEN  (64 + 1)
 
-void fastboot_fail(const char *reason);
-void fastboot_okay(const char *reason);
+/**
+ * fastboot_response() - Writes a response of the form "$tag$reason".
+ *
+ * @tag: The first part of the response
+ * @response: Pointer to fastboot response buffer
+ * @format: printf style format string
+ */
+void fastboot_response(const char *tag, char *response,
+                      const char *format, ...)
+       __attribute__ ((format (__printf__, 3, 4)));
 
+/**
+ * fastboot_fail() - Write a FAIL response of the form "FAIL$reason".
+ *
+ * @reason: Pointer to returned reason string
+ * @response: Pointer to fastboot response buffer
+ */
+void fastboot_fail(const char *reason, char *response);
+
+/**
+ * fastboot_okay() - Write an OKAY response of the form "OKAY$reason".
+ *
+ * @reason: Pointer to returned reason string, or NULL to send a bare "OKAY"
+ * @response: Pointer to fastboot response buffer
+ */
+void fastboot_okay(const char *reason, char *response);
+int fastboot_set_reboot_flag(void);
 #endif /* _FASTBOOT_H_ */