tzsetup: make UTC the first (default) region

Many sysadmins prefer to configure their systems to UTC and it's a
reasonable default when installing, making it easier to get a usable
system by just hitting <return> repeatidly.

Renumber UTC to 0 to preserve the finger memory of those selecting a
region by shortcut.

Reviewed by:	jrtc27, emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D42383
This commit is contained in:
Brooks Davis 2023-10-30 23:33:14 +00:00
parent 6c1e79df8c
commit 6f7c45056f

View file

@ -171,6 +171,7 @@ static struct continent_names {
const char *name; const char *name;
struct continent *continent; struct continent *continent;
} continent_names[] = { } continent_names[] = {
{ "UTC", &utc },
{ "Africa", &africa }, { "Africa", &africa },
{ "America", &america }, { "America", &america },
{ "Antarctica", &antarctica }, { "Antarctica", &antarctica },
@ -181,13 +182,13 @@ static struct continent_names {
{ "Europe", &europe }, { "Europe", &europe },
{ "Indian", &indian }, { "Indian", &indian },
{ "Pacific", &pacific }, { "Pacific", &pacific },
{ "UTC", &utc }
}; };
static struct continent_items { static struct continent_items {
char prompt[3]; char prompt[3];
char title[30]; char title[30];
} continent_items[] = { } continent_items[] = {
{ "0", "UTC" },
{ "1", "Africa" }, { "1", "Africa" },
{ "2", "America -- North and South" }, { "2", "America -- North and South" },
{ "3", "Antarctica" }, { "3", "Antarctica" },
@ -198,14 +199,13 @@ static struct continent_items {
{ "8", "Europe" }, { "8", "Europe" },
{ "9", "Indian Ocean" }, { "9", "Indian Ocean" },
{ "10", "Pacific Ocean" }, { "10", "Pacific Ocean" },
{ "11", "UTC" }
}; };
#define NCONTINENTS \ #define NCONTINENTS \
(int)((sizeof(continent_items)) / (sizeof(continent_items[0]))) (int)((sizeof(continent_items)) / (sizeof(continent_items[0])))
static dialogMenuItem continents[NCONTINENTS]; static dialogMenuItem continents[NCONTINENTS];
#define OCEANP(x) ((x) == 3 || (x) == 5 || (x) == 8 || (x) == 9) #define OCEANP(x) ((x) == 4 || (x) == 6 || (x) == 9 || (x) == 10)
static int static int
continent_country_menu(dialogMenuItem *continent) continent_country_menu(dialogMenuItem *continent)