]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/um/drivers/cow_user.c
Merge tag 'vfio-v5.6-rc1' of git://github.com/awilliam/linux-vfio
[linux.git] / arch / um / drivers / cow_user.c
index 74b0c2686c95e7b5fdd8c6c82ad17457e2c03433..29b46581ddd137c6418d8b8d6ec7a6febe4080c1 100644 (file)
@@ -17,6 +17,7 @@
 
 #define PATH_LEN_V1 256
 
+/* unsigned time_t works until year 2106 */
 typedef __u32 time32_t;
 
 struct cow_header_v1 {
@@ -197,7 +198,7 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
                     int sectorsize, int alignment, unsigned long long *size)
 {
        struct cow_header_v3 *header;
-       unsigned long modtime;
+       long long modtime;
        int err;
 
        err = cow_seek_file(fd, 0);
@@ -276,7 +277,7 @@ int file_reader(__u64 offset, char *buf, int len, void *arg)
 
 int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
                    __u32 *version_out, char **backing_file_out,
-                   time_t *mtime_out, unsigned long long *size_out,
+                   long long *mtime_out, unsigned long long *size_out,
                    int *sectorsize_out, __u32 *align_out,
                    int *bitmap_offset_out)
 {
@@ -363,7 +364,7 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
 
                /*
                 * this was used until Dec2005 - 64bits are needed to represent
-                * 2038+. I.e. we can safely do this truncating cast.
+                * 2106+. I.e. we can safely do this truncating cast.
                 *
                 * Additionally, we must use be32toh() instead of be64toh(), since
                 * the program used to use the former (tested - I got mtime