lfs_changelog() should use ".09d" when printing the fractional part
instead of ".06d" for accurate timestamps.
Test-Parameters: trivial
Signed-off-by: akam kumar bharathi <azurelustre@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I2b219f588de688ba06b3c8cf3ccd255ed845c45e
Reviewed-on: https://review.whamcloud.com/18006
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
- while ((rc = llapi_changelog_recv(changelog_priv, &rec)) == 0) {
- time_t secs;
- struct tm ts;
+ while ((rc = llapi_changelog_recv(changelog_priv, &rec)) == 0) {
+ time_t secs;
+ struct tm ts;
- if (endrec && rec->cr_index > endrec) {
- llapi_changelog_free(&rec);
- break;
- }
- if (rec->cr_index < startrec) {
- llapi_changelog_free(&rec);
- continue;
- }
+ if (endrec && rec->cr_index > endrec) {
+ llapi_changelog_free(&rec);
+ break;
+ }
+ if (rec->cr_index < startrec) {
+ llapi_changelog_free(&rec);
+ continue;
+ }
secs = rec->cr_time >> 30;
gmtime_r(&secs, &ts);
secs = rec->cr_time >> 30;
gmtime_r(&secs, &ts);
- printf("%ju %02d%-5s %02d:%02d:%02d.%06d %04d.%02d.%02d "
- "0x%x t="DFID, (uintmax_t) rec->cr_index, rec->cr_type,
+ printf("%ju %02d%-5s %02d:%02d:%02d.%09d %04d.%02d.%02d "
+ "0x%x t="DFID, (uintmax_t)rec->cr_index, rec->cr_type,
changelog_type2str(rec->cr_type),
ts.tm_hour, ts.tm_min, ts.tm_sec,
changelog_type2str(rec->cr_type),
ts.tm_hour, ts.tm_min, ts.tm_sec,
- (int)(rec->cr_time & ((1<<30) - 1)),
+ (int)(rec->cr_time & ((1 << 30) - 1)),
ts.tm_year + 1900, ts.tm_mon + 1, ts.tm_mday,
rec->cr_flags & CLF_FLAGMASK, PFID(&rec->cr_tfid));
ts.tm_year + 1900, ts.tm_mon + 1, ts.tm_mday,
rec->cr_flags & CLF_FLAGMASK, PFID(&rec->cr_tfid));