-
Notifications
You must be signed in to change notification settings - Fork 348
Start addressing unchecked snprintf() calls #3898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b3a416b
655b98e
960d042
0fcc669
8d47cea
335a2ac
4b075d2
4d739a9
6bad182
b8316fa
d001021
8ed2743
cdeccf6
e63bdba
4c1024f
107a779
5ebfd70
c16887f
a4d9c92
249a3da
d37b5e2
3f848cb
4c17a60
3702fcb
4ee10dc
47741a9
697422f
cf90a75
b1f4cc9
008efad
1315fd4
e75b485
6af9ad6
c076d5e
906b56e
d0a14b0
b31f2ab
5ed177a
566398f
dd9e8f5
f07769d
c162dee
ccbb956
6a3c450
3bb625e
ff0e441
f0af304
a5658f7
5a783ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,14 +114,27 @@ whether and how Pacemaker calls them. | |
| | | recipient of that alert, that recipient will not be | | ||
| | | used. *(since 2.1.6)* | | ||
+------------------+---------------+-----------------------------------------------------+ | ||
| timestamp-format | %H:%M:%S.%06N | .. index:: | | ||
| timestamp-format | %H:%M:%S.%6N | .. index:: | | ||
| | | single: alert; meta-attribute, timestamp-format | | ||
| | | single: meta-attribute; timestamp-format (alert) | | ||
| | | single: timestamp-format; alert meta-attribute | | ||
| | | | | ||
| | | Format the cluster will use when sending the | | ||
| | | event's timestamp to the agent. This is a string as | | ||
| | | used with the ``date(1)`` command. | | ||
| | | used with the ``date(1)`` command, with the | | ||
| | | following extension. ``"%xN"``, where ``x`` is a | | ||
| | | number with ``1 <= x <= 6``, prints the fractional | | ||
| | | seconds component of the timestamp at ``10^(-x)`` | | ||
| | | resolution, without a decimal point (``'.'``). | | ||
| | | Values are truncated toward zero, not rounded. | | ||
| | | | | ||
| | | Note: This is implemented using ``strftime()`` with | | ||
| | | a 128-character buffer. If any format specifier's | | ||
| | | expansion requires more than 128 characters, or if | | ||
| | | any specifier expands to an empty string, then the | | ||
| | | timestamp is discarded. (Expanding to an empty | | ||
| | | string is not an error, but there is no way to | | ||
| | | distinguish this from a too-small buffer.) | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://docs.gtk.org/glib/method.DateTime.format.html could be worth looking into. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ......I looked hard for anything like this, in GLib or elsewhere, and never found this. Sigh. What I did find was https://docs.gtk.org/glib/type_func.Date.strftime.html, which doesn't help at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The '%f' could be interesting. Unfortunately it seems not to support limiting to less than 6 digits. And I guess we should stay compatible here with the timestamp-format introduced initially. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This wouldn't mean we have to use Although even there, "The format strings understood by this function are a subset of the "Subset." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So far, two unit tests fail because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was just thinking of a way to get rid of the %N implementation stating that "s/%.+N/%f/" is unfortunately not exactly the same :-( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A width field should be fine with the %N implementation but it would as well stumble over a bare '%' at least if there is another format to follow as it would eat the next '%'. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updating to use |
||
+------------------+---------------+-----------------------------------------------------+ | ||
| timeout | 30s | .. index:: | | ||
| | | single: alert; meta-attribute, timeout | | ||
|
Uh oh!
There was an error while loading. Please reload this page.