aboutsummaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-10-28 15:06:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-28 15:06:31 +0000
commitcd99bbfd50d1548f911cc72f059f5be172341976 (patch)
treea55729526ecc7a71dd500f8a4611e0217d734ab2 /libc
parent8eb8c3929974060e0d8b5063886d6ed250198d41 (diff)
parent4c30130a2155c37e80af4c3b53bf4f6ce832e760 (diff)
downloadbionic-cd99bbfd50d1548f911cc72f059f5be172341976.tar.gz
Merge "Disable tzdata in $ANDROID_DATA." into lmp-mr1-dev
Diffstat (limited to 'libc')
-rw-r--r--libc/tzcode/localtime.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libc/tzcode/localtime.c b/libc/tzcode/localtime.c
index 3bbed9086..28d13f417 100644
--- a/libc/tzcode/localtime.c
+++ b/libc/tzcode/localtime.c
@@ -2252,14 +2252,11 @@ static int __bionic_open_tzdata_path(const char* path_prefix_variable, const cha
}
static int __bionic_open_tzdata(const char* olson_id, int* data_size) {
- int fd = __bionic_open_tzdata_path("ANDROID_DATA", "/misc/zoneinfo/tzdata", olson_id, data_size);
- if (fd < 0) {
- fd = __bionic_open_tzdata_path("ANDROID_ROOT", "/usr/share/zoneinfo/tzdata", olson_id, data_size);
- if (fd == -2) {
- // 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);
- }
+ int fd = __bionic_open_tzdata_path("ANDROID_ROOT", "/usr/share/zoneinfo/tzdata", olson_id, data_size);
+ if (fd == -2) {
+ // 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;
}