summaryrefslogtreecommitdiff
path: root/sdcard
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-07-25 03:01:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-24 22:43:15 +0000
commit504b4e9cc93abbcd115c72e7b2707d73df442090 (patch)
treec39b7456738e1a93389aa03331ad8e8368c964c5 /sdcard
parent2befa73f680c8340e5581aa3ef68281f7223e6e4 (diff)
parent8d28fa71fce6a5623488614250970ce78551a924 (diff)
Merge "sdcard: ensure installd fs upgrade has completed" into lmp-dev
Diffstat (limited to 'sdcard')
-rw-r--r--sdcard/sdcard.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index 558d7f499..587a4cd9e 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -1857,6 +1857,7 @@ int main(int argc, char **argv)
bool split_perms = false;
int i;
struct rlimit rlim;
+ int fs_version;
int opt;
while ((opt = getopt(argc, argv, "u:g:w:t:dls")) != -1) {
@@ -1931,6 +1932,11 @@ int main(int argc, char **argv)
ERROR("Error setting RLIMIT_NOFILE, errno = %d\n", errno);
}
+ while ((fs_read_atomic_int("/data/.layout_version", &fs_version) == -1) || (fs_version < 3)) {
+ ERROR("installd fs upgrade not yet complete. Waiting...\n");
+ sleep(1);
+ }
+
res = run(source_path, dest_path, uid, gid, write_gid, num_threads, derive, split_perms);
return res < 0 ? 1 : 0;
}