aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/f_fastboot.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index a54b4eebcca..2e87feeece3 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -413,8 +413,16 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req)
else
strcpy(response, "FAILValue not set");
} else {
- printf("WARNING: unknown variable: %s\n", cmd);
- strcpy(response, "FAILVariable not implemented");
+ char envstr[32];
+
+ snprintf(envstr, sizeof(envstr) - 1, "fastboot.%s", cmd);
+ s = getenv(envstr);
+ if (s) {
+ strncat(response, s, chars_left);
+ } else {
+ printf("WARNING: unknown variable: %s\n", cmd);
+ strcpy(response, "FAILVariable not implemented");
+ }
}
fastboot_tx_write_str(response);
}