refit/refit-0.14-gptsync_nom_nom_nom_newline.patch
Silvan Calarco 7228158b62 added patches from https://patches.ubuntu.com/doh/r/refit/extracted/ to build refit.efi
added icons and default configuration file [release 0.14-2mamba;Wed Jul 11 2012]
2024-01-05 17:24:44 +01:00

26 lines
822 B
Diff

#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_gptsync_nom_nom_nom_newline.dpatch by <jblache@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: When prompting for user input, consume characters up to the
## DP: newline character; avoids leaving characters behind that end
## DP: up being consumed by the shell after gptsync terminates.
@DPATCH@
diff -urNad refit-src-0.11~/gptsync/os_unix.c refit-src-0.11/gptsync/os_unix.c
--- refit-src-0.11~/gptsync/os_unix.c 2006-11-28 04:26:27.000000000 +0100
+++ refit-src-0.11/gptsync/os_unix.c 2008-05-21 22:06:54.885831483 +0200
@@ -150,7 +150,11 @@
printf("No\n");
*bool_out = FALSE;
}
-
+
+ /* Consume everything up to and including newline */
+ while (getchar() != '\n')
+ ;
+
return 0;
}