From: Piotr Dymacz Date: Mon, 3 Feb 2014 22:24:06 +0000 (+0100) Subject: New defines which allow to disable U-Boot and/or ART upgrade in web failsafe mode X-Git-Tag: 2014-11-19~32^2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9813f6814e082750ce3ffa15693e63eed32e976a;p=oweals%2Fu-boot_mod.git New defines which allow to disable U-Boot and/or ART upgrade in web failsafe mode --- 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");