last modified time of the device, then force a reverify;
it means the system time may not be trustworthy.
+2004-04-19 Theodore Ts'o <tytso@mit.edu>
+
+ * probe.c (blkid_verify_devname): If the time is earlier than the
+ last modified time of the device, then force a reverify;
+ it means the system time may not be trustworthy.
+
2004-04-12 Theodore Ts'o <tytso@mit.edu>
* cache.c (blkid_get_cache): If the BLKID_FILE environment
unsigned char *bufs[BLKID_BLK_OFFS + 1], *buf;
const char *type;
struct stat st;
- time_t diff;
+ time_t diff, now;
int fd, idx;
if (!dev)
return NULL;
- diff = time(0) - dev->bid_time;
+ now = time(0);
+ diff = now - dev->bid_time;
- if (diff < BLKID_PROBE_MIN || (dev->bid_flags & BLKID_BID_FL_VERIFIED &&
- diff < BLKID_PROBE_INTERVAL))
+ if ((now < dev->bid_time) ||
+ (diff < BLKID_PROBE_MIN) ||
+ (dev->bid_flags & BLKID_BID_FL_VERIFIED &&
+ diff < BLKID_PROBE_INTERVAL))
return dev;
DBG(DEBUG_PROBE,