New defines which allow to disable U-Boot and/or ART upgrade in web failsafe mode
authorPiotr Dymacz <pepe2k@gmail.com>
Mon, 3 Feb 2014 22:24:06 +0000 (23:24 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Mon, 3 Feb 2014 22:24:06 +0000 (23:24 +0100)
u-boot/httpd/httpd.c

index 02777fdc2dc915555422c4e7ee34845c97df423a..2d7c048c71950248c1c52b1c72bd3fe97f4b6fe5 100755 (executable)
@@ -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");