summaryrefslogtreecommitdiffstats
path: root/libc/tzcode
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-10-25 14:38:51 -0700
committerElliott Hughes <enh@google.com>2012-10-25 14:56:08 -0700
commit49271d89dabae182f5614c0d5fb232dac3c16067 (patch)
tree47a1bb592168d9015caaec999d625196727ceca9 /libc/tzcode
parent7b68e3f799d87e84c56687033326924fd8fec84c (diff)
downloadbionic-49271d89dabae182f5614c0d5fb232dac3c16067.zip
bionic-49271d89dabae182f5614c0d5fb232dac3c16067.tar.gz
bionic-49271d89dabae182f5614c0d5fb232dac3c16067.tar.bz2
Fix recovery: don't assert if there's no tzdata.
Change-Id: I4d808b57c63ec1ccc024da7fd6a65691e0d455c5
Diffstat (limited to 'libc/tzcode')
-rw-r--r--libc/tzcode/localtime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/tzcode/localtime.c b/libc/tzcode/localtime.c
index 0ab9e0f..447907e 100644
--- a/libc/tzcode/localtime.c
+++ b/libc/tzcode/localtime.c
@@ -2318,7 +2318,9 @@ static int __bionic_open_tzdata(const char* olson_id, int* data_size) {
if (fd < 0) {
fd = __bionic_open_tzdata_path("/system/usr/share/zoneinfo/tzdata", olson_id, data_size);
if (fd == -2) {
- __assert2(__FILE__, __LINE__, __func__, "couldn't find any tzdata!");
+ // The first thing that 'recovery' does is try to format the current time. It doesn't have
+ // any tzdata available, so we must not abort here --- doing so breaks the recovery image!
+ fprintf(stderr, "%s: couldn't find any tzdata when looking for %s!\n", __FUNCTION__, olson_id);
}
}
return fd;