Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156732438
D45575.id139835.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45575.id139835.diff
View Options
Index: usr.sbin/tzsetup/tzsetup.c
===================================================================
--- usr.sbin/tzsetup/tzsetup.c
+++ usr.sbin/tzsetup/tzsetup.c
@@ -902,23 +902,28 @@
char prompt[128];
int fd;
#endif
- int c, rv, skiputc;
+ int c, rv;
+ bool skiputc;
+ char *dztpath;
+#if defined(__i386__) || defined(__amd64__)
char vm_guest[16] = "";
size_t len = sizeof(vm_guest);
- char *dztpath;
+ skiputc = false;
+
+ /* Default skiputc to true for VM guests */
+ if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) == 0 &&
+ strcmp(vm_guest, "none") != 0)
+ skiputc = true;
+#else
+ skiputc = true;
+#endif
dztpath = NULL;
- skiputc = 0;
#ifdef HAVE_BSDDIALOG
setlocale(LC_ALL, "");
#endif
- /* Default skiputc to 1 for VM guests */
- if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) == 0 &&
- strcmp(vm_guest, "none") != 0)
- skiputc = 1;
-
while ((c = getopt(argc, argv, "C:cd:lnrs")) != -1) {
switch (c) {
case 'C':
@@ -943,7 +948,7 @@
#endif
break;
case 's':
- skiputc = 1;
+ skiputc = true;
break;
default:
usage();
@@ -1038,7 +1043,7 @@
if (bsddialog_init() == BSDDIALOG_ERROR)
errx(1, "Error bsddialog: %s\n", bsddialog_geterror());
- if (skiputc == 0) {
+ if (!skiputc) {
snprintf(prompt, sizeof(prompt),
"Is this machine's CMOS clock set to UTC? "
"If it is set to local time,\n"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 11:50 PM (14 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33160213
Default Alt Text
D45575.id139835.diff (1 KB)
Attached To
Mode
D45575: tzsetup: ask local/UTC question only on x86
Attached
Detach File
Event Timeline
Log In to Comment