mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 06:42:51 +01:00
libdevdctl: Force full match of "timestamp" field name
OpenZFS generates events with a "zio_timestamp" field, which gets mistaken for "timestamp" by libdevdctl due to imprecise string matching. Then later it is assumed a "timestamp" field exists when it doesn't and an exception is thrown. Add a space to the search string so we match exactly "timestamp" rather than anything with that as a suffix. Approved by: mav (mentor) MFC after: 3 days Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
aa5e1b42e6
commit
5f018c9147
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362544
@ -427,7 +427,7 @@ Event::TimestampEventString(std::string &eventString)
|
||||
* Add a timestamp as the final field of the event if it is
|
||||
* not already present.
|
||||
*/
|
||||
if (eventString.find("timestamp=") == string::npos) {
|
||||
if (eventString.find(" timestamp=") == string::npos) {
|
||||
const size_t bufsize = 32; // Long enough for a 64-bit int
|
||||
timeval now;
|
||||
char timebuf[bufsize];
|
||||
|
Loading…
Reference in New Issue
Block a user