blob: ee482b5ca0501ece708d4f9f21823757951e4f0b [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 835baf02fd42012bbc0603dffb1f80c6ecf0fb9e Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Mon, 8 Feb 2016 11:18:52 +0200
4Subject: [PATCH] Fix some type comparison problems
5
6As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed
7timestamps will overflow in the year 2038. It already changed the
8utime and ctime in struct mdu_array_info_s from int to unsigned
9int. So we need to change the values that compared with them to
10unsigned int too.
11
12Upstream-Status: Backport
13
14Signed-off-by : Xiao Ni <xni@redhat.com>
15Signed-off-by: Maxin B. John <maxin.john@intel.com>
16---
17
18 Monitor.c | 2 +-
19 util.c | 2 +-
20 2 files changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/Monitor.c b/Monitor.c
23index f19c2e5..6df80f9 100644
24--- a/Monitor.c
25+++ b/Monitor.c
26@@ -33,7 +33,7 @@
27 struct state {
28 char *devname;
29 char devnm[32]; /* to sync with mdstat info */
30- long utime;
31+ unsigned int utime;
32 int err;
33 char *spare_group;
34 int active, working, failed, spare, raid;
35diff --git a/util.c b/util.c
36index 3e6d293..96a806d 100644
37--- a/util.c
38+++ b/util.c
39@@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
40 */
41 struct superswitch *ss;
42 struct supertype *st;
43- time_t besttime = 0;
44+ unsigned int besttime = 0;
45 int bestsuper = -1;
46 int i;
47
48--
492.4.0
50