hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/um/drivers/cow_user.c
....@@ -1,6 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Copyright (C) 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
3
- * Licensed under the GPL
44 */
55
66 /*
....@@ -17,6 +17,7 @@
1717
1818 #define PATH_LEN_V1 256
1919
20
+/* unsigned time_t works until year 2106 */
2021 typedef __u32 time32_t;
2122
2223 struct cow_header_v1 {
....@@ -197,7 +198,7 @@
197198 int sectorsize, int alignment, unsigned long long *size)
198199 {
199200 struct cow_header_v3 *header;
200
- unsigned long modtime;
201
+ long long modtime;
201202 int err;
202203
203204 err = cow_seek_file(fd, 0);
....@@ -276,7 +277,7 @@
276277
277278 int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
278279 __u32 *version_out, char **backing_file_out,
279
- time_t *mtime_out, unsigned long long *size_out,
280
+ long long *mtime_out, unsigned long long *size_out,
280281 int *sectorsize_out, __u32 *align_out,
281282 int *bitmap_offset_out)
282283 {
....@@ -363,7 +364,7 @@
363364
364365 /*
365366 * this was used until Dec2005 - 64bits are needed to represent
366
- * 2038+. I.e. we can safely do this truncating cast.
367
+ * 2106+. I.e. we can safely do this truncating cast.
367368 *
368369 * Additionally, we must use be32toh() instead of be64toh(), since
369370 * the program used to use the former (tested - I got mtime