installgrub.c (9348d232) installgrub.c (21ba817c)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 44 unchanged lines hidden (view full) ---

53#include <libnvpair.h>
54#include <libfstyp.h>
55
56#include "message.h"
57#include "installgrub.h"
58#include "./../common/bblk_einfo.h"
59#include "./../common/boot_utils.h"
60#include "./../common/mboot_extra.h"
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 44 unchanged lines hidden (view full) ---

53#include <libnvpair.h>
54#include <libfstyp.h>
55
56#include "message.h"
57#include "installgrub.h"
58#include "./../common/bblk_einfo.h"
59#include "./../common/boot_utils.h"
60#include "./../common/mboot_extra.h"
61#include "getresponse.h"
61
62#ifndef TEXT_DOMAIN
63#define TEXT_DOMAIN "SUNW_OST_OSCMD"
64#endif
65
66/*
67 * Variables to track installgrub desired mode of operation.
68 * 'nowrite' and 'boot_debug' come from boot_common.h.

--- 57 unchanged lines hidden (view full) ---

126 int opt;
127 int params = 3;
128 int ret;
129 char **handle_args;
130 char *progname;
131
132 (void) setlocale(LC_ALL, "");
133 (void) textdomain(TEXT_DOMAIN);
62
63#ifndef TEXT_DOMAIN
64#define TEXT_DOMAIN "SUNW_OST_OSCMD"
65#endif
66
67/*
68 * Variables to track installgrub desired mode of operation.
69 * 'nowrite' and 'boot_debug' come from boot_common.h.

--- 57 unchanged lines hidden (view full) ---

127 int opt;
128 int params = 3;
129 int ret;
130 char **handle_args;
131 char *progname;
132
133 (void) setlocale(LC_ALL, "");
134 (void) textdomain(TEXT_DOMAIN);
135 if (init_yes() < 0) {
136 (void) fprintf(stderr, gettext(ERR_MSG_INIT_YES),
137 strerror(errno));
138 exit(BC_ERROR);
139 }
134
135 /*
136 * retro-compatibility: installing the bootblock is the default
137 * and there is no switch for it.
138 */
139 do_install = B_TRUE;
140
141 while ((opt = getopt(argc, argv, "dVMFfmneiu:")) != EOF) {

--- 702 unchanged lines hidden (view full) ---

844 device->start_sector = secnum;
845 device->partition = pno - 1;
846 log_part = 1;
847
848found_part:
849 /* get confirmation for -m */
850 if (write_mbr && !force_mbr) {
851 (void) fprintf(stdout, MBOOT_PROMPT);
140
141 /*
142 * retro-compatibility: installing the bootblock is the default
143 * and there is no switch for it.
144 */
145 do_install = B_TRUE;
146
147 while ((opt = getopt(argc, argv, "dVMFfmneiu:")) != EOF) {

--- 702 unchanged lines hidden (view full) ---

850 device->start_sector = secnum;
851 device->partition = pno - 1;
852 log_part = 1;
853
854found_part:
855 /* get confirmation for -m */
856 if (write_mbr && !force_mbr) {
857 (void) fprintf(stdout, MBOOT_PROMPT);
852 if (getchar() != 'y') {
858 if (!yes()) {
853 write_mbr = 0;
854 (void) fprintf(stdout, MBOOT_NOT_UPDATED);
855 return (BC_ERROR);
856 }
857 }
858
859 /*
860 * Currently if Solaris is in an extended partition we need to

--- 764 unchanged lines hidden ---
859 write_mbr = 0;
860 (void) fprintf(stdout, MBOOT_NOT_UPDATED);
861 return (BC_ERROR);
862 }
863 }
864
865 /*
866 * Currently if Solaris is in an extended partition we need to

--- 764 unchanged lines hidden ---