From: SourceForge.net <no...@so...> - 2011-12-12 12:30:25
|
Bugs item #3457592, was opened at 2011-12-11 14:40 Message generated for change (Comment added) made by mwalle You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=3457592&group_id=71730 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Michael Walle (mwalle) Assigned to: Nobody/Anonymous (nobody) Summary: oh_decode_time() decodes relative times as "invalid time" Initial Comment: SaHpi.h defines SAHPI_TIME_UNSPECIFIED as the lowest possible number (remember SaHpiTimeT is signed). oh_decode_time() checks for (time > SAHPI_TIME_UNSPECIFIED) which always evaluates to true. Therefore, the else branch will never be executed. There should never be an "Invalid time" if relative timestamps can be negative. ---------------------------------------------------------------------- Comment By: Michael Walle (mwalle) Date: 2011-12-12 04:30 Message: Section 8.1 specifies relative times 'since startup'. So there should be a check for negative relative times. I suggest an output like: "[[[<d> days] <h> hours] <m> minutes] <s> seconds since startup" or if that is too long use d, h, m, s for days, hours, minutes, seconds rsp. ---------------------------------------------------------------------- Comment By: Anton Pak (avpak) Date: 2011-12-12 03:06 Message: Yes, the check for (time > SAHPI_TIME_UNSPECIFIED) is incorrect. And probably the output for relative time is incorrect too. As I can see we can have up to ~10000 days for max relative time. What do you think is the best way to make textual representation of the relative time? What about "REL <x> seconds" or "REL <x> hours <y> seconds"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=3457592&group_id=71730 |