diff options
| author | Toomas Soome <tsoome@me.com> | 2015-06-26 18:55:09 +0300 |
|---|---|---|
| committer | Dan McDonald <danmcd@omniti.com> | 2015-07-28 12:10:44 -0400 |
| commit | 21ba817cf9fbfe996f2d2729ed55dd15531eb5c7 (patch) | |
| tree | b85e7df84781253479cd4ec5799b718ac7cbe1c7 /usr/src/cmd/boot/installgrub/installgrub.c | |
| parent | 11b942e373071da9f760d7e6208bc79a7bbf7d3c (diff) | |
| download | illumos-joyent-21ba817cf9fbfe996f2d2729ed55dd15531eb5c7.tar.gz | |
6039 installgrub MBR update response check should use locale specific yesexpr
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/cmd/boot/installgrub/installgrub.c')
| -rw-r--r-- | usr/src/cmd/boot/installgrub/installgrub.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/cmd/boot/installgrub/installgrub.c b/usr/src/cmd/boot/installgrub/installgrub.c index 694193d9c7..0ae6749bcc 100644 --- a/usr/src/cmd/boot/installgrub/installgrub.c +++ b/usr/src/cmd/boot/installgrub/installgrub.c @@ -58,6 +58,7 @@ #include "./../common/bblk_einfo.h" #include "./../common/boot_utils.h" #include "./../common/mboot_extra.h" +#include "getresponse.h" #ifndef TEXT_DOMAIN #define TEXT_DOMAIN "SUNW_OST_OSCMD" @@ -131,6 +132,11 @@ main(int argc, char *argv[]) (void) setlocale(LC_ALL, ""); (void) textdomain(TEXT_DOMAIN); + if (init_yes() < 0) { + (void) fprintf(stderr, gettext(ERR_MSG_INIT_YES), + strerror(errno)); + exit(BC_ERROR); + } /* * retro-compatibility: installing the bootblock is the default @@ -849,7 +855,7 @@ found_part: /* get confirmation for -m */ if (write_mbr && !force_mbr) { (void) fprintf(stdout, MBOOT_PROMPT); - if (getchar() != 'y') { + if (!yes()) { write_mbr = 0; (void) fprintf(stdout, MBOOT_NOT_UPDATED); return (BC_ERROR); |
