summaryrefslogtreecommitdiff
path: root/user/mac-fdisk/flush-stdout.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-12-17 20:49:14 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-12-17 20:49:14 -0600
commit656ae6bf9f8a64aee95c4797b20bfe713627f1f4 (patch)
tree366e9d652b612699a1dbc2cc06d489badb346985 /user/mac-fdisk/flush-stdout.patch
parent68d3758eaa1d21de0b83304ecdef74546d7af594 (diff)
downloadpackages-656ae6bf9f8a64aee95c4797b20bfe713627f1f4.tar.gz
packages-656ae6bf9f8a64aee95c4797b20bfe713627f1f4.tar.bz2
packages-656ae6bf9f8a64aee95c4797b20bfe713627f1f4.tar.xz
packages-656ae6bf9f8a64aee95c4797b20bfe713627f1f4.zip
user/mac-fdisk: possible fix for #39
Diffstat (limited to 'user/mac-fdisk/flush-stdout.patch')
-rw-r--r--user/mac-fdisk/flush-stdout.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/user/mac-fdisk/flush-stdout.patch b/user/mac-fdisk/flush-stdout.patch
new file mode 100644
index 000000000..a4a1c69ba
--- /dev/null
+++ b/user/mac-fdisk/flush-stdout.patch
@@ -0,0 +1,59 @@
+--- mac-fdisk-0.1.orig/io.c.old 2017-12-17 20:36:23.277115889 -0600
++++ mac-fdisk-0.1.orig/io.c 2017-12-17 20:46:59.295011785 -0600
+@@ -148,6 +148,7 @@
+
+ flush_to_newline(0);
+ printf(prompt);
++ fflush(stdout);
+
+ for (;;) {
+ c = getch();
+@@ -166,6 +167,7 @@
+ } else {
+ flush_to_newline(0);
+ printf(prompt);
++ fflush(stdout);
+ }
+ }
+ return -1;
+@@ -179,6 +181,7 @@
+
+ if (promptBeforeGet) {
+ printf(prompt);
++ fflush(stdout);
+ }
+ for (;;) {
+ c = getch();
+@@ -189,6 +192,7 @@
+ // skip blanks and tabs
+ } else if (c == '\n') {
+ printf(prompt);
++ fflush(stdout);
+ } else {
+ *command = c;
+ return 1;
+@@ -214,6 +218,7 @@
+ } else if (c == '\n') {
+ if (default_value < 0) {
+ printf(prompt);
++ fflush(stdout);
+ } else {
+ ungetch(c);
+ *number = default_value;
+@@ -292,6 +297,7 @@
+ } else if (c == '\n') {
+ if (reprompt) {
+ printf(prompt);
++ fflush(stdout);
+ } else {
+ ungetch(c);
+ *string = NULL;
+@@ -466,7 +472,7 @@
+ long t;
+
+ if (rflag) {
+- printf("Can't write block %u to file", (unsigned int)num);
++ printf("Can't write block %u to file\n", (unsigned int)num);
+ return 0;
+ }
+ #ifndef __linux__