am 957f6188: Merge "Changes to re-enable overrides for tz data"
				
					
				
			* commit '957f6188fa7494ea8b7701b14df4c9127d27a9ef': Changes to re-enable overrides for tz data
This commit is contained in:
		@@ -2253,12 +2253,15 @@ 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) {
 | 
					static int __bionic_open_tzdata(const char* olson_id, int* data_size) {
 | 
				
			||||||
  int fd = __bionic_open_tzdata_path("ANDROID_ROOT", "/usr/share/zoneinfo/tzdata", olson_id, data_size);
 | 
					  int fd = __bionic_open_tzdata_path("ANDROID_DATA", "/misc/zoneinfo/current/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) {
 | 
					    if (fd == -2) {
 | 
				
			||||||
      // The first thing that 'recovery' does is try to format the current time. It doesn't have
 | 
					      // 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!
 | 
					      // 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);
 | 
					      fprintf(stderr, "%s: couldn't find any tzdata when looking for %s!\n", __FUNCTION__, olson_id);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  return fd;
 | 
					  return fd;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user