~ubuntu-branches/ubuntu/oneiric/open-vm-tools/oneiric

« back to all changes in this revision

Viewing changes to toolbox/toolboxcmd-time.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2010-07-03 21:34:25 UTC
  • mto: (2.4.17 sid)
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20100703213425-5qyyduxi1td9oiu2
Tags: upstream-2010.06.16-268169
ImportĀ upstreamĀ versionĀ 2010.06.16-268169

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 */
71
71
 
72
72
static int
73
 
TimeSyncEnable(gboolean quiet) // IN: verbosity flag
 
73
TimeSyncEnable(void)
74
74
{
75
75
   TimeSyncSet(TRUE);
76
 
   if (!quiet) {
77
 
      printf("Enabled\n");
78
 
   }
 
76
   ToolsCmd_Print("%s\n", SU_(option.enabled, "Enabled"));
79
77
   return EXIT_SUCCESS;
80
78
}
81
79
 
97
95
 */
98
96
 
99
97
static int
100
 
TimeSyncDisable(gboolean quiet) // IN: verbosity flag
 
98
TimeSyncDisable(void)
101
99
{
102
100
   TimeSyncSet(FALSE);
103
 
   if (!quiet) {
104
 
      printf("Disabled\n");
105
 
   }
 
101
   ToolsCmd_Print("%s\n", SU_(option.disabled, "Disabled"));
106
102
   return EXIT_SUCCESS;
107
103
}
108
104
 
115
111
 *      Checks the status of time sync in VMX.
116
112
 *
117
113
 * Results:
118
 
 *      EXIT_SUCCESS
 
114
 *      EXIT_SUCCESS: time sync is enabled.
 
115
 *      EX_UNAVAILABLE: time sync is disabled.
119
116
 *
120
117
 * Side effects:
121
118
 *      None.
130
127
   if (GuestApp_OldGetOptions() & VMWARE_GUI_SYNC_TIME) {
131
128
      status = TRUE;
132
129
   }
133
 
   printf("%s\n", status ? "Enabled" : "Disabled");
134
 
   return EXIT_SUCCESS;
 
130
   if (status) {
 
131
      ToolsCmd_Print("%s\n", SU_(option.enabled, "Enabled"));
 
132
      return EXIT_SUCCESS;
 
133
   } else {
 
134
      ToolsCmd_Print("%s\n", SU_(option.disabled, "Disabled"));
 
135
      return EX_UNAVAILABLE;
 
136
   }
135
137
}
136
138
 
137
139
 
158
160
                 gboolean quiet)  // IN
159
161
{
160
162
   if (toolbox_strcmp(argv[optind], "enable") == 0) {
161
 
      return TimeSyncEnable(quiet);
 
163
      return TimeSyncEnable();
162
164
   } else if (toolbox_strcmp(argv[optind], "disable") == 0) {
163
 
      return TimeSyncDisable(quiet);
 
165
      return TimeSyncDisable();
164
166
   } else if (toolbox_strcmp(argv[optind], "status") == 0) {
165
167
      return TimeSyncStatus();
166
168
   } else {