summaryrefslogtreecommitdiff
path: root/packages/uboot/u-boot-mkimage-gta01-native/dontask.patch
blob: 23d4b13626fc813fc27bff9519d4f8ac33cd51d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
common/cmd_nand.c (yes): if the environment variable "dontask" is set to "y" or
  "Y", non-interactively assume the answer was "yes". In all other cases, ask.

- Werner Almesberger <werner@openmoko.org>

Index: u-boot/common/cmd_nand.c
===================================================================
--- u-boot.orig/common/cmd_nand.c
+++ u-boot/common/cmd_nand.c
@@ -165,8 +165,12 @@ out:
 
 static int yes(void)
 {
+	char *s;
 	char c;
 
+	s = getenv("dontask");
+	if (s && (s[0] =='y' || s[0] == 'Y') && !s[1])
+		return 1;
 	c = getc();
 	if (c != 'y' && c != 'Y')
 		return 0;