diff options
Diffstat (limited to 'recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch')
-rw-r--r-- | recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch b/recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch new file mode 100644 index 0000000000..5e83125e35 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch @@ -0,0 +1,27 @@ +From 794e4aa6a5aa5fbe71b08bfe8f5f5f65078fbc68 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Tue, 23 Mar 2010 09:12:16 -0700 +Subject: [PATCH 16/37] env_nand.c: fail gracefully if no nand is present + +--- + common/env_nand.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/common/env_nand.c b/common/env_nand.c +index a15a950..325f112 100644 +--- a/common/env_nand.c ++++ b/common/env_nand.c +@@ -268,6 +268,10 @@ int readenv (size_t offset, u_char * buf) + + u_char *char_ptr; + ++ /* fail if no nand detected */ ++ if (nand_info[0].type == 0) ++ return 1; ++ + blocksize = nand_info[0].erasesize; + len = min(blocksize, CONFIG_ENV_SIZE); + +-- +1.6.6.1 + |