From 9813f6814e082750ce3ffa15693e63eed32e976a Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Mon, 3 Feb 2014 23:24:06 +0100 Subject: [PATCH] New defines which allow to disable U-Boot and/or ART upgrade in web failsafe mode --- u-boot/httpd/httpd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/u-boot/httpd/httpd.c b/u-boot/httpd/httpd.c index 02777fd..2d7c048 100755 --- a/u-boot/httpd/httpd.c +++ b/u-boot/httpd/httpd.c @@ -129,16 +129,22 @@ static int httpd_findandstore_firstchunk(void){ end = (char *)strstr((char *)start, "name=\"uboot\""); if(end){ - +#if defined(WEBFAILSAFE_DISABLE_UBOOT_UPGRADE) + printf("## Error: U-Boot upgrade is not allowed on this board!\n"); + webfailsafe_upload_failed = 1; +#else webfailsafe_upgrade_type = WEBFAILSAFE_UPGRADE_TYPE_UBOOT; printf("Upgrade type: U-Boot\n"); - +#endif /* if defined(WEBFAILSAFE_DISABLE_UBOOT_UPGRADE) */ } else { end = (char *)strstr((char *)start, "name=\"art\""); if(end){ - +#if defined(WEBFAILSAFE_DISABLE_ART_UPGRADE) + printf("## Error: U-Boot upgrade is not allowed on this board!\n"); + webfailsafe_upload_failed = 1; +#else printf("Upgrade type: ART\n"); webfailsafe_upgrade_type = WEBFAILSAFE_UPGRADE_TYPE_ART; @@ -153,7 +159,7 @@ static int httpd_findandstore_firstchunk(void){ webfailsafe_upload_failed = 1; } #endif - +#endif /* if defined(WEBFAILSAFE_DISABLE_ART_UPGRADE) */ } else { printf("## Error: input name not found!\n"); -- 2.25.1