Merge "macOS build fix: no off64_t on darwin." into rvc-dev
diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp
index 47cf843..d418122 100644
--- a/fs_mgr/fs_mgr.cpp
+++ b/fs_mgr/fs_mgr.cpp
@@ -358,7 +358,7 @@
const struct ext4_super_block* sb, int* fs_stat) {
bool has_quota = (sb->s_feature_ro_compat & cpu_to_le32(EXT4_FEATURE_RO_COMPAT_QUOTA)) != 0;
bool want_quota = entry.fs_mgr_flags.quota;
- bool want_projid = android::base::GetBoolProperty("ro.emulated_storage.projid", false);
+ bool want_projid = android::base::GetBoolProperty("external_storage.projid.enabled", false);
if (has_quota == want_quota) {
return;
@@ -521,7 +521,8 @@
static void tune_casefold(const std::string& blk_device, const struct ext4_super_block* sb,
int* fs_stat) {
bool has_casefold = (sb->s_feature_incompat & cpu_to_le32(EXT4_FEATURE_INCOMPAT_CASEFOLD)) != 0;
- bool wants_casefold = android::base::GetBoolProperty("ro.emulated_storage.casefold", false);
+ bool wants_casefold =
+ android::base::GetBoolProperty("external_storage.casefold.enabled", false);
if (!wants_casefold || has_casefold) return;
diff --git a/fs_mgr/fs_mgr_format.cpp b/fs_mgr/fs_mgr_format.cpp
index 7be024f..fd7386d 100644
--- a/fs_mgr/fs_mgr_format.cpp
+++ b/fs_mgr/fs_mgr_format.cpp
@@ -160,8 +160,8 @@
bool needs_projid = false;
if (entry.mount_point == "/data") {
- needs_casefold = android::base::GetBoolProperty("ro.emulated_storage.casefold", false);
- needs_projid = android::base::GetBoolProperty("ro.emulated_storage.projid", false);
+ needs_casefold = android::base::GetBoolProperty("external_storage.casefold.enabled", false);
+ needs_projid = android::base::GetBoolProperty("external_storage.projid.enabled", false);
}
if (entry.fs_type == "f2fs") {
diff --git a/libziparchive/include/ziparchive/zip_archive.h b/libziparchive/include/ziparchive/zip_archive.h
index 098a9cb..fbc47db 100644
--- a/libziparchive/include/ziparchive/zip_archive.h
+++ b/libziparchive/include/ziparchive/zip_archive.h
@@ -47,9 +47,10 @@
// Modification time. The zipfile format specifies
// that the first two little endian bytes contain the time
// and the last two little endian bytes contain the date.
- // See `GetModificationTime`.
+ // See `GetModificationTime`. Use signed integer to avoid the
+ // sub-overflow.
// TODO: should be overridden by extra time field, if present.
- uint32_t mod_time;
+ int32_t mod_time;
// Returns `mod_time` as a broken-down struct tm.
struct tm GetModificationTime() const;
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
index fb2a1d2..489fcb1 100644
--- a/libziparchive/zip_archive.cc
+++ b/libziparchive/zip_archive.cc
@@ -1299,6 +1299,7 @@
return true;
}
+// This function returns the embedded timestamp as is; and doesn't perform validations.
tm ZipEntry::GetModificationTime() const {
tm t = {};