[Pkg-libvirt-commits] [libguestfs] 121/165: New API: journal_get_realtime_usec
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:25:07 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 2d996df66c8d67e11a91a89c074c91a233356494
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Jun 14 13:27:02 2014 +0100
New API: journal_get_realtime_usec
This adds a binding for sd_journal_get_realtime_usec(3).
---
daemon/journal.c | 17 +++++++++++++++++
generator/actions.ml | 10 ++++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/daemon/journal.c b/daemon/journal.c
index 97e1874..1351032 100644
--- a/daemon/journal.c
+++ b/daemon/journal.c
@@ -214,6 +214,23 @@ do_journal_set_data_threshold (int64_t threshold)
return 0;
}
+int64_t
+do_journal_get_realtime_usec (void)
+{
+ int r;
+ size_t ret;
+
+ NEED_HANDLE (-1);
+
+ r = sd_journal_get_realtime_usec (j, &ret);
+ if (r < 0) {
+ reply_with_perror_errno (-r, "sd_journal_get_realtime_usec");
+ return -1;
+ }
+
+ return ret;
+}
+
#else /* !HAVE_SD_JOURNAL */
OPTGROUP_JOURNAL_NOT_AVAILABLE
diff --git a/generator/actions.ml b/generator/actions.ml
index 3bd41f0..48213c5 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -11908,6 +11908,16 @@ New (SVR4) portable format with a checksum.
=back" };
+ { defaults with
+ name = "journal_get_realtime_usec";
+ style = RInt64 "usec", [], [];
+ proc_nr = Some 420;
+ optional = Some "journal";
+ test_excuse = "tests in tests/journal subdirectory";
+ shortdesc = "get the timestamp of the current journal entry";
+ longdesc = "\
+Get the realtime (wallclock) timestamp of the current journal entry." };
+
]
(* Non-API meta-commands available only in guestfish.
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
index 7b53aa0..816d01b 100644
--- a/src/MAX_PROC_NR
+++ b/src/MAX_PROC_NR
@@ -1 +1 @@
-419
+420
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list