Home | History | Annotate | Download | only in fastbootd

Lines Matching full:phandle

54 static void cmd_boot(struct protocol_handle *phandle, const char *arg)
72 if (phandle->download_fd < 0) {
73 fastboot_fail(phandle, "no kernel file");
79 fastboot_fail(phandle, "atags read error");
85 if (flash_validate_certificate(phandle->download_fd, &data_fd) != 1) {
86 fastboot_fail(phandle, "Access forbiden you need the certificate");
98 fastboot_fail(phandle, "internal fastbootd error");
103 fastboot_fail(phandle, "invalid bootimage header");
114 fastboot_fail(phandle, "atags generate error");
118 fastboot_fail(phandle, "atags file to large");
123 fastboot_fail(phandle, "incomplete bootimage");
138 fastboot_fail(phandle, "kexec prepare failed");
142 fastboot_okay(phandle, "");
152 fastboot_fail(phandle, "reboot error");
165 static void cmd_erase(struct protocol_handle *phandle, const char *arg)
172 fastboot_fail(phandle, "partition table doesn't exist");
177 fastboot_fail(phandle, "Couldn't find partition");
183 fastboot_fail(phandle, "partiton file does not exists");
187 fastboot_fail(phandle, "failed to erase partition");
194 fastboot_fail(phandle, "failed to erase partition");
197 fastboot_okay(phandle, "");
220 static void cmd_gpt_layout(struct protocol_handle *phandle, const char *arg) {
228 fastboot_fail(phandle, "blockdev not defined in config file");
233 if (phandle->download_fd < 0) {
234 fastboot_fail(phandle, "no layout file");
247 if (!GPT_parse_file(phandle->download_fd, &content)) {
248 fastboot_fail(phandle, "Could not parse partition config file");
253 fastboot_fail(phandle, "Vendor forbids this opperation");
259 fastboot_fail(phandle, "Unable to write gpt file");
265 fastboot_okay(phandle, "");
268 static void cmd_flash(struct protocol_handle *phandle, const char *arg)
279 if (try_handle_virtual_partition(phandle, arg)) {
283 if (phandle->download_fd < 0) {
284 fastboot_fail(phandle, "no kernel file");
289 fastboot_fail(phandle, "partition table doesn't exist");
293 if (flash_validate_certificate(phandle->download_fd, &data_fd) != 1) {
294 fastboot_fail(phandle, "Access forbiden you need certificate");
301 fastboot_fail(phandle, "incoming data read error, cannot read boot header");
305 fastboot_fail(phandle, "image is not a boot image");
319 fastboot_fail(phandle, "size of file too large");
325 if (flash_write(partition, phandle->download_fd, sz, header_sz)) {
326 fastboot_fail(phandle, "flash write failure");
334 fastboot_okay(phandle, "");
337 static void cmd_continue(struct protocol_handle *phandle, const char *arg)
339 fastboot_okay(phandle, "");
347 static void cmd_getvar(struct protocol_handle *phandle, const char *arg)
354 fastboot_okay(phandle, value);
357 static void cmd_download(struct protocol_handle *phandle, const char *arg)
363 fastboot_fail(phandle, "data too large");
367 fastboot_data(phandle, len);
369 old_fd = protocol_get_download(phandle);
376 phandle->download_fd = protocol_handle_download(phandle, len);
377 if (phandle->download_fd < 0) {
378 fastboot_fail(phandle, "download failed");
382 fastboot_okay(phandle, "");
385 static void cmd_oem(struct protocol_handle *phandle, const char *arg) {
390 fastboot_fail(phandle, response);
392 fastboot_okay(phandle, response);