]> sourceware.org Git - lvm2.git/commitdiff
dmstats: don't declare _start_timestamp if HAVE_SYS_TIMERFD_H
authorBryn M. Reeves <bmr@redhat.com>
Sun, 18 Dec 2016 14:08:11 +0000 (14:08 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Sun, 18 Dec 2016 14:08:11 +0000 (14:08 +0000)
The _start_timestamp is not used by the TIMERFD clock.

tools/dmsetup.c

index e5ac80acc66b1c61bce982e545d91c9bcd3d1d60..3f2c619cbe7636472b623cfa5000dfbfb247c7d1 100644 (file)
@@ -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
This page took 0.041097 seconds and 5 git commands to generate.