From Adrien Destugues <pulkomandy@xxxxxxxxx>:
Adrien Destugues has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/2684 ;)
Change subject: dstcheck: do nothing if clock is clearly in the past.
......................................................................
dstcheck: do nothing if clock is clearly in the past.
Fixes #15855
---
M src/bin/dstcheck.cpp
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/84/2684/1
diff --git a/src/bin/dstcheck.cpp b/src/bin/dstcheck.cpp
index 30281e3..01ceab5 100644
--- a/src/bin/dstcheck.cpp
+++ b/src/bin/dstcheck.cpp
@@ -107,6 +107,12 @@
time(&t);
localtime_r(&t, &tm);
+ if (tm.tm_year < (2020 - 1900)) {
+ fprintf(stderr, "%s: not checking because clock is not set.\n",
+ argv[0]);
+ exit(1);
+ }
+
char path[B_PATH_NAME_LENGTH];
if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, true, path,
B_PATH_NAME_LENGTH) != B_OK) {
--
To view, visit https://review.haiku-os.org/c/haiku/+/2684
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I0a08863fa81ef96b16543d28d7e95731f34f60ea
Gerrit-Change-Number: 2684
Gerrit-PatchSet: 1
Gerrit-Owner: Adrien Destugues <pulkomandy@xxxxxxxxx>
Gerrit-MessageType: newchange