##########################################################
-# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+# Copyright (C) 2010-2017 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
disk.wipe.ignoreFreeSpaceWarnings = "Ignorieren Sie während des Wiper-Vorgangs etwaige Warnungen bezüglich des Speicherplatzes.\n"
-disk.wiper.error = "Fehler: %1$s"
-
disk.wiper.file.error = "Fehler, Erstellen der Wiper-Datei nicht möglich.\n"
disk.wiper.progress = "\rProgress: %1$d"
+error.message = "Fehler: %1$s\n"
+
error.missing = "%1$s: %2$s fehlt\n"
error.noadmin.posix = "%1$s: Sie müssen root-Benutzer sein, um die %2$s-Vorgänge auszuführen.\n"
##########################################################
-# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+# Copyright (C) 2010-2017 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
disk.wipe.ignoreFreeSpaceWarnings = "ワイプ プロセス中に表示されるディスク領域に関する警告はすべて無視してください。\n"
-disk.wiper.error = "エラー: %1$s"
-
disk.wiper.file.error = "エラー。ワイパー ファイルを作成できません。\n"
disk.wiper.progress = "\r進行状況: %1$d"
+error.message = "エラー: %1$s\n"
+
error.missing = "%1$s: %2$s が見つかりません\n"
error.noadmin.posix = "%1$s: %2$s 操作を実行するには、root ユーザーである必要があります。\n"
##########################################################
-# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+# Copyright (C) 2010-2017 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
disk.wipe.ignoreFreeSpaceWarnings = "지우기 프로세스가 실행되는 동안에는 디스크 공간에 대한 주의를 무시하십시오.\n"
-disk.wiper.error = "오류: %1$s"
-
disk.wiper.file.error = "오류. 와이퍼 파일을 생성할 수 없습니다.\n"
disk.wiper.progress = "\r진행률: %1$d"
+error.message = "오류: %1$s\n"
+
error.missing = "%1$s: %2$s이(가) 없음\n"
error.noadmin.posix = "%1$s: %2$s 작업은 루트 사용자만 수행할 수 있습니다.\n"
##########################################################
-# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+# Copyright (C) 2010-2017 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
disk.wipe.ignoreFreeSpaceWarnings = "请忽略擦除过程期间有关磁盘空间的任何警告。\n"
-disk.wiper.error = "错误: %1$s"
-
disk.wiper.file.error = "错误,无法创建擦除器文件。\n"
disk.wiper.progress = "\r进度:%1$d"
+error.message = "错误: %1$s\n"
+
error.missing = "%1$s: 缺失 %2$s\n"
error.noadmin.posix = "%1$s: 您必须是 root 用户才能执行 %2$s 操作。\n"
/*********************************************************
- * Copyright (C) 2008-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2017 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
SU_(disk.wiper.file.error,
"Error, Unable to create wiper file.\n"));
} else {
- ToolsCmd_PrintErr(SU_(disk.wiper.error, "Error: %s"), err);
+ ToolsCmd_PrintErr(SU_(error.message, "Error: %s\n"), err);
}
rc = EX_TEMPFAIL;
/*********************************************************
- * Copyright (C) 2008-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2017 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
#include "vmware/guestrpc/tclodefs.h"
#include "vmware/guestrpc/timesync.h"
#include "vmware/tools/i18n.h"
+#include "vmware/tools/utils.h"
/*
*-----------------------------------------------------------------------------
*/
-static void
-TimeSyncSet(Bool enable) // IN: status
+static gboolean
+TimeSyncSet(Bool enable, // IN:
+ char **reply, // OUT:
+ size_t *replyLen) // OUT:
{
gchar *msg = g_strdup_printf("vmx.set_option %s %s %s",
TOOLSOPTION_SYNCTIME,
!enable ? "1" : "0",
enable ? "1" : "0");
- ToolsCmd_SendRPC(msg, strlen(msg) + 1, NULL, NULL);
+ return ToolsCmd_SendRPC(msg, strlen(msg) + 1, reply, replyLen);
}
* Enable time sync.
*
* Results:
- * EXIT_SUCCESS
+ * EXIT_SUCCESS on success, EXIT_FAILURE on failure.
*
* Side effects:
* Same as TimeSyncSet.
static int
TimeSyncEnable(void)
{
- TimeSyncSet(TRUE);
- ToolsCmd_Print("%s\n", SU_(option.enabled, "Enabled"));
- return EXIT_SUCCESS;
+ int ret = EXIT_SUCCESS;
+ char *reply = NULL;
+ size_t replyLen;
+
+ if (TimeSyncSet(TRUE, &reply, &replyLen)) {
+ ToolsCmd_Print("%s\n", SU_(option.enabled, "Enabled"));
+ } else {
+ ToolsCmd_PrintErr(SU_(error.message, "Error: %s\n"), reply);
+ ret = EXIT_FAILURE;
+ }
+
+ vm_free(reply);
+ return ret;
}
* Disable time sync.
*
* Results:
- * EXIT_SUCCESS
+ * EXIT_SUCCESS on success, EXIT_FAILURE on failure.
*
* Side effects:
* Same as TimeSyncSet.
static int
TimeSyncDisable(void)
{
- TimeSyncSet(FALSE);
- ToolsCmd_Print("%s\n", SU_(option.disabled, "Disabled"));
- return EXIT_SUCCESS;
+ int ret = EXIT_SUCCESS;
+ char *reply = NULL;
+ size_t replyLen;
+
+ if (TimeSyncSet(FALSE, &reply, &replyLen)) {
+ ToolsCmd_Print("%s\n", SU_(option.disabled, "Disabled"));
+ } else {
+ ToolsCmd_PrintErr(SU_(error.message, "Error: %s\n"), reply);
+ ret = EXIT_FAILURE;
+ }
+
+ vm_free(reply);
+ return ret;
}