libguestfs/SOURCES/0025-OCaml-tools-fix-3999-3...

78 lines
3.2 KiB
Diff

From 1d6f775d8826915f9547c7dcac0fd10e702c3d80 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Mon, 1 Apr 2019 17:01:44 +0200
Subject: [PATCH] OCaml tools: fix 3999 -> 3339 typo
RFC 3339 is the actual RFC for date/time strings.
Typo found by Martin 'eagle eyes' Kletzander.
Fixes commit f79129b8dc92470e3a5597daf53c84038bd6859e.
(cherry picked from commit 1086599ad8eeb8be299d5ffbcb2efb1024ff9ab8)
---
common/mltools/tools_utils-c.c | 4 ++--
common/mltools/tools_utils.ml | 4 ++--
lib/guestfs.pod | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/common/mltools/tools_utils-c.c b/common/mltools/tools_utils-c.c
index b015dcace..3b80091c0 100644
--- a/common/mltools/tools_utils-c.c
+++ b/common/mltools/tools_utils-c.c
@@ -39,7 +39,7 @@
extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv);
extern value guestfs_int_mllib_set_echo_keys (value unitv);
extern value guestfs_int_mllib_set_keys_from_stdin (value unitv);
-extern value guestfs_int_mllib_rfc3999_date_time_string (value unitv);
+extern value guestfs_int_mllib_rfc3339_date_time_string (value unitv);
/* Interface with the guestfish inspection and decryption code. */
int echo_keys = 0;
@@ -108,7 +108,7 @@ guestfs_int_mllib_set_keys_from_stdin (value unitv)
}
value
-guestfs_int_mllib_rfc3999_date_time_string (value unitv)
+guestfs_int_mllib_rfc3339_date_time_string (value unitv)
{
CAMLparam1 (unitv);
char buf[64];
diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml
index de42df600..127180225 100644
--- a/common/mltools/tools_utils.ml
+++ b/common/mltools/tools_utils.ml
@@ -32,7 +32,7 @@ and key_store_key =
external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> unit = "guestfs_int_mllib_inspect_decrypt"
external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc"
external c_set_keys_from_stdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" "noalloc"
-external c_rfc3999_date_time_string : unit -> string = "guestfs_int_mllib_rfc3999_date_time_string"
+external c_rfc3339_date_time_string : unit -> string = "guestfs_int_mllib_rfc3339_date_time_string"
type machine_readable_fn = {
pr : 'a. ('a, unit, string, unit) format4 -> 'a;
@@ -93,7 +93,7 @@ let log_as_json msgtype msg =
| Some { pr } ->
let json = [
"message", JSON.String msg;
- "timestamp", JSON.String (c_rfc3999_date_time_string ());
+ "timestamp", JSON.String (c_rfc3339_date_time_string ());
"type", JSON.String msgtype;
] in
pr "%s\n" (JSON.string_of_doc ~fmt:JSON.Compact json)
diff --git a/lib/guestfs.pod b/lib/guestfs.pod
index 3c1d635c5..af944ddb7 100644
--- a/lib/guestfs.pod
+++ b/lib/guestfs.pod
@@ -3295,7 +3295,7 @@ within a single line, below it is indented for readability):
C<type> can be: C<message> for progress messages, C<info> for
information messages, C<warning> for warning messages, and C<error>
for error message.
-C<timestamp> is the L<RFC 3999|https://www.ietf.org/rfc/rfc3339.txt>
+C<timestamp> is the L<RFC 3339|https://www.ietf.org/rfc/rfc3339.txt>
timestamp of the message.
In addition to that, a subset of these tools support an extra string
--
2.18.4