diff options
Diffstat (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/dontask.patch')
-rw-r--r-- | meta/packages/uboot/u-boot-mkimage-openmoko-native/dontask.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/dontask.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/dontask.patch new file mode 100644 index 0000000000..23d4b13626 --- /dev/null +++ b/meta/packages/uboot/u-boot-mkimage-openmoko-native/dontask.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | common/cmd_nand.c (yes): if the environment variable "dontask" is set to "y" or | ||
2 | "Y", non-interactively assume the answer was "yes". In all other cases, ask. | ||
3 | |||
4 | - Werner Almesberger <werner@openmoko.org> | ||
5 | |||
6 | Index: u-boot/common/cmd_nand.c | ||
7 | =================================================================== | ||
8 | --- u-boot.orig/common/cmd_nand.c | ||
9 | +++ u-boot/common/cmd_nand.c | ||
10 | @@ -165,8 +165,12 @@ out: | ||
11 | |||
12 | static int yes(void) | ||
13 | { | ||
14 | + char *s; | ||
15 | char c; | ||
16 | |||
17 | + s = getenv("dontask"); | ||
18 | + if (s && (s[0] =='y' || s[0] == 'Y') && !s[1]) | ||
19 | + return 1; | ||
20 | c = getc(); | ||
21 | if (c != 'y' && c != 'Y') | ||
22 | return 0; | ||