master - dmstats: don't declare _start_timestamp if HAVE_SYS_TIMERFD_H
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a15f0d181ca2fb44c9c854dfba425d372a8756c6 Commit: a15f0d181ca2fb44c9c854dfba425d372a8756c6 Parent: 3e53adf7c0b83194a74a9fa75a7ebbf1c077de9a Author: Bryn M. Reeves <[email protected]> AuthorDate: Sun Dec 18 14:08:11 2016 +0000 Committer: Bryn M. Reeves <[email protected]> CommitterDate: Sun Dec 18 14:08:11 2016 +0000
dmstats: don't declare _start_timestamp if HAVE_SYS_TIMERFD_H
The _start_timestamp is not used by the TIMERFD clock.
--- tools/dmsetup.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
tools/dmsetup.c +5 -3
@@ -282,13 +282,15 @@ const char *_stats_types[] = {/* report timekeeping */ static struct dm_timestamp *_cycle_timestamp =NULL ; +#ifndef HAVE_SYS_TIMERFD_H static struct dm_timestamp *_start_timestamp =NULL ; +#else /* HAVE_SYS_TIMERFD_H */ +static int _timer_fd =-1 ;/* timerfd file descriptor. */ +#endif /* !HAVE_SYS_TIMERFD_H */ +static uint64_t _interval =0 ;/* configured interval in nsecs */ static uint64_t _new_interval =0 ;/* flag top-of-interval */ static uint64_t _last_interval =0 ;/* approx. measured interval in nsecs */ -#ifdef HAVE_SYS_TIMERFD_H -static int _timer_fd =-1 ;/* timerfd file descriptor. */ -#endif /* HAVE_SYS_TIMERFD_H */ /* Invalid fd value used to signal end-of-reporting. */ #define TIMER_STOPPED -2