diff mbox

[OpenWrt-Devel,1/2] oxnas: drop some unused sysupgrade code

Message ID 1442334497-19000-1-git-send-email-zajec5@gmail.com
State Accepted
Headers show

Commit Message

Rafał Miłecki Sept. 15, 2015, 4:28 p.m. UTC
First of all platform_do_upgrade_phase2 doesn't seem to be defined
anywhere. Other than that platform_do_upgrade is not likely to be ever
called. There is a call to nand_do_platform_check which triggers
nand_upgrade_stage1 call with "exit 0" in it.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 target/linux/oxnas/base-files/lib/upgrade/platform.sh | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Daniel Golle Sept. 21, 2015, 9:37 a.m. UTC | #1
Hi!

First of all sorry for the delay. Both patches look correct to me,
thanks for the good work! I new tested them on Shuttle KD-20 and
sysupgrade works great with both patches applied.


On Tue, Sep 15, 2015 at 06:28:16PM +0200, Rafał Miłecki wrote:
> First of all platform_do_upgrade_phase2 doesn't seem to be defined
> anywhere. Other than that platform_do_upgrade is not likely to be ever
> called. There is a call to nand_do_platform_check which triggers
> nand_upgrade_stage1 call with "exit 0" in it.
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>


Cheers


Daniel

> ---
>  target/linux/oxnas/base-files/lib/upgrade/platform.sh | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/target/linux/oxnas/base-files/lib/upgrade/platform.sh b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
> index 8591c7d..a43391c 100644
> --- a/target/linux/oxnas/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
> @@ -15,15 +15,6 @@ platform_check_image() {
>  	return $?
>  }
>  
> -platform_do_upgrade() {
> -	if [ $$ -ne 1 ]; then
> -		echo "not PID 1, upgrade aborted."
> -		return 1;
> -	fi
> -	platform_do_upgrade_phase2 "$1" "$CONF_TAR" "$SAVE_CONFIG"
> -}
> -
> -
>  disable_watchdog() {
>  	killall watchdog
>  	( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
> -- 
> 1.8.4.5
>
Rafał Miłecki Sept. 21, 2015, 9:55 a.m. UTC | #2
On 21 September 2015 at 11:37, Daniel Golle <daniel@makrotopia.org> wrote:
> First of all sorry for the delay. Both patches look correct to me,
> thanks for the good work! I new tested them on Shuttle KD-20 and
> sysupgrade works great with both patches applied.
>
>
> On Tue, Sep 15, 2015 at 06:28:16PM +0200, Rafał Miłecki wrote:
>> First of all platform_do_upgrade_phase2 doesn't seem to be defined
>> anywhere. Other than that platform_do_upgrade is not likely to be ever
>> called. There is a call to nand_do_platform_check which triggers
>> nand_upgrade_stage1 call with "exit 0" in it.
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> Acked-by: Daniel Golle <daniel@makrotopia.org>

Thanks & no worries, it wasn't a long delay after all :)
diff mbox

Patch

diff --git a/target/linux/oxnas/base-files/lib/upgrade/platform.sh b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
index 8591c7d..a43391c 100644
--- a/target/linux/oxnas/base-files/lib/upgrade/platform.sh
+++ b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
@@ -15,15 +15,6 @@  platform_check_image() {
 	return $?
 }
 
-platform_do_upgrade() {
-	if [ $$ -ne 1 ]; then
-		echo "not PID 1, upgrade aborted."
-		return 1;
-	fi
-	platform_do_upgrade_phase2 "$1" "$CONF_TAR" "$SAVE_CONFIG"
-}
-
-
 disable_watchdog() {
 	killall watchdog
 	( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {