[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#804359: flash-kernel: Little-endianness is tested incorrectly for NSLU2



Package: flash-kernel
Version: 3.48
Severity: normal
Tags: patch

The nslu2_swap() function incorrectly tests $little_endian and will
always think it is true.

Untested patch attached since I don't have a slug.
>From e719eabe8f4640fb192dae4ce44235653ce8e803 Mon Sep 17 00:00:00 2001
From: Eric Cooper <ecc@cmu.edu>
Date: Sat, 7 Nov 2015 12:58:04 -0500
Subject: [PATCH] Test $little_endian correctly in nslu2_swap()

Signed-off-by: Eric Cooper <ecc@cmu.edu>
---
 functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions b/functions
index ea69df7..35d872b 100644
--- a/functions
+++ b/functions
@@ -425,7 +425,7 @@ sercomm_header() {
 }
 
 nslu2_swap() {
-	if [ "$little_endian" ]; then
+	if [ "$little_endian" -eq 1 ]; then
 		devio "<<$1" "xp $,4"
 	else
 		cat "$1"
-- 
2.6.2


Reply to: