mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-03 20:54:42 +02:00
* add more hacks to compile * binaries tested on Zaurus poodle/corgi (with patched kernel) * bump PR * NOTES * strange behavior wrt getopt for at least ubiformat: * you should pass the options first, i.e. * ubiformat -O 512 /dev/mtd3 *works* * ubiformat /dev/mtd3 -O 512 *fails* Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
31 lines
686 B
Diff
31 lines
686 B
Diff
--- a/ubi-utils/ubiformat.c 2012-05-03 01:14:39.000000000 +0200
|
|
+++ b/ubi-utils/ubiformat.c 2012-05-03 01:00:57.000000000 +0200
|
|
@@ -246,7 +246,11 @@
|
|
|
|
while (1) {
|
|
normsg_cont("continue? (yes/no) ");
|
|
- if (scanf("%3s", buf) == EOF) {
|
|
+
|
|
+ fflush(stderr);
|
|
+ fflush(stdout);
|
|
+
|
|
+ if (fgets(buf,4,stdin) == NULL) {
|
|
sys_errmsg("scanf returned unexpected EOF, assume \"yes\"");
|
|
return 1;
|
|
}
|
|
@@ -259,10 +263,13 @@
|
|
|
|
static int answer_is_yes(void)
|
|
{
|
|
+ fflush(stderr);
|
|
+ fflush(stdout);
|
|
+
|
|
char buf[4];
|
|
|
|
while (1) {
|
|
- if (scanf("%3s", buf) == EOF) {
|
|
+ if (fgets(buf,4,stdin) == NULL) {
|
|
sys_errmsg("scanf returned unexpected EOF, assume \"no\"");
|
|
return 0;
|
|
}
|