--- a/usr/src/cmd/gui-install/src/map.c Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/cmd/gui-install/src/map.c Wed Mar 10 17:42:46 2010 +0000
@@ -810,14 +810,38 @@
return;
}
- continents = g_new0(continent_item, nctnt + 1);
+ continents = g_new0(continent_item, nctnt + 2);
if (!continents) {
g_warning("no enough memory\n");
map_timezone_cleanup(map);
return;
}
- for (i = 1, pctnt = ctnts; pctnt != NULL;
+ /* Add item to continent/country/timelist lists for GMT/UTC */
+ continents[1].continent = g_new0(struct tz_continent, 1);
+ sprintf(continents[1].continent->ctnt_name, "GMT/UTC");
+ continents[1].continent->ctnt_id_desc = g_strdup("GMT/UTC");
+ continents[1].continent->ctnt_display_desc = NULL;
+ continents[1].continent->ctnt_next = ctnts;
+ continents[1].nctry = 2;
+
+ continents[1].ctry = g_new0(country_item, 2);
+ continents[1].ctry[1].country = g_new0(struct tz_country, 1);
+ sprintf(continents[1].ctry[1].country->ctry_code, "GMT/UTC");
+ continents[1].ctry[1].country->ctry_id_desc = g_strdup("--");
+ continents[1].ctry[1].country->ctry_display_desc = NULL;
+ continents[1].ctry[1].ntz = 2;
+ continents[1].ctry[1].ctnt = &continents[1];
+
+ continents[1].ctry[1].tz = g_new0(timezone_item, 2);
+ continents[1].ctry[1].tz[1].timezone = g_new0(struct tz_timezone, 1);
+ sprintf(continents[1].ctry[1].tz[1].timezone->tz_name, "UTC");
+ continents[1].ctry[1].tz[1].timezone->tz_id_desc = g_strdup("GMT/UTC");
+ continents[1].ctry[1].tz[1].timezone->tz_display_desc = NULL;
+ continents[1].ctry[1].tz[1].ctry = NULL;
+
+ /* Add Rest of continents */
+ for (i = 2, pctnt = ctnts; pctnt != NULL;
pctnt = pctnt->ctnt_next, i++) {
struct tz_country *ctries;
struct tz_country *pctry;
--- a/usr/src/cmd/gui-install/src/orchestrator-wrappers.c Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/cmd/gui-install/src/orchestrator-wrappers.c Wed Mar 10 17:42:46 2010 +0000
@@ -905,14 +905,6 @@
om_set_install_lang_by_name(lang_name);
}
-void
-orchestrator_om_set_preinstal_time_zone(
- gchar *country,
- gchar *timezone)
-{
- om_set_preinstall_timezone(country, timezone);
-}
-
int
orchestrator_om_perform_install(
nvlist_t *uchoices,
--- a/usr/src/cmd/gui-install/src/orchestrator-wrappers.h Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/cmd/gui-install/src/orchestrator-wrappers.h Wed Mar 10 17:42:46 2010 +0000
@@ -286,11 +286,6 @@
orchestrator_om_locale_is_utf8(locale_info_t *locale);
void
-orchestrator_om_set_preinstal_time_zone(
- gchar *country,
- gchar *timezone);
-
-void
orchestrator_om_free_locale(locale_info_t *locale);
void
--- a/usr/src/cmd/gui-install/src/timezone.c Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/cmd/gui-install/src/timezone.c Wed Mar 10 17:42:46 2010 +0000
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -194,11 +194,14 @@
/*
* if can not get current timezone,
* set the default combo box entry
- * to "- Select -".
+ * to "GMT/UTC"
*/
- sys_ctnt = &ctnt[0];
- sys_ctry = &ctnt[1].ctry[0];
- sys_tz = &ctnt[1].ctry[1].tz[0];
+ sys_ctnt = &ctnt[1];
+ sys_ctry = &ctnt[1].ctry[1];
+ sys_tz = &ctnt[1].ctry[1].tz[1];
+ sys_ctnt_index = 1;
+ sys_ctry_index = 1;
+ sys_tz_index = 1;
}
for (i = 0; i < nctnt; i++) {
@@ -713,7 +716,6 @@
gint ictnt;
gint ictry;
gint itz;
- static gboolean first_time = TRUE;
g_return_val_if_fail(IS_TIMEZONE(timezone), FALSE);
@@ -743,17 +745,6 @@
ctnt[ictnt].ctry[ictry].tz[itz].timezone;
g_warning("timezone:%s",
ctnt[ictnt].ctry[ictry].tz[itz].timezone->tz_name);
- if (first_time) {
- /*
- * This is used to
- * determine the default
- * language and should be
- * called for only one time.
- */
- orchestrator_om_set_preinstal_time_zone(profile->country->ctry_code,
- profile->timezone->tz_name);
- first_time = FALSE;
- }
return (TRUE);
}
}
--- a/usr/src/lib/libict/ict_private.h Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/lib/libict/ict_private.h Wed Mar 10 17:42:46 2010 +0000
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,8 +34,6 @@
#include <ls_api.h>
#include <ti_api.h>
-extern char *pre_inst_timezone;
-
/*
* General defines
*/
--- a/usr/src/lib/liborchestrator/orchestrator_api.h Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/lib/liborchestrator/orchestrator_api.h Wed Mar 10 17:42:46 2010 +0000
@@ -558,8 +558,6 @@
/* timezone.c */
int om_set_time_zone(char *timezone);
-int om_set_preinstall_timezone(char *country, char *timezone);
-char *om_get_preinstall_timezone();
/* om_misc.c */
int16_t om_get_error();
--- a/usr/src/lib/liborchestrator/orchestrator_private.h Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/lib/liborchestrator/orchestrator_private.h Wed Mar 10 17:42:46 2010 +0000
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,8 +34,6 @@
#include <ls_api.h>
#include <ti_api.h>
-extern char *pre_inst_timezone;
-
/*
* Password/shadow file defines
*/
--- a/usr/src/lib/liborchestrator/timezone.c Mon Mar 08 16:55:50 2010 -0700
+++ b/usr/src/lib/liborchestrator/timezone.c Wed Mar 10 17:42:46 2010 +0000
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -41,7 +41,6 @@
#include "admutil.h"
#include "orchestrator_private.h"
-char *pre_inst_timezone;
int
om_set_time_zone(char *timezone)
@@ -78,29 +77,3 @@
om_log_print("Set timezone \n");
return (OM_SUCCESS);
}
-
-/* ARGSUSED */
-int
-om_set_preinstall_timezone(char *country, char *timezone)
-{
-
- if (country == NULL) {
- om_log_print("country value is null\n");
- om_set_error(OM_INVALID_TIMEZONE);
- return (OM_FAILURE);
- }
- pre_inst_timezone = strdup(country);
- if (pre_inst_timezone == NULL) {
- om_log_print("couldn strdup memory\n");
- om_set_error(OM_NO_SPACE);
- return (OM_FAILURE);
- }
- return (OM_SUCCESS);
-}
-
-
-char *
-om_get_preinstall_timzone(void)
-{
- return (pre_inst_timezone);
-}