diff options
author | Koushik Dutta <koushd@gmail.com> | 2012-07-03 00:49:03 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2012-07-03 00:50:23 -0700 |
commit | d9115b7888a4423116f819c89f0dc868f2916544 (patch) | |
tree | 908ee5155d1906749edaf84bc523cb522480e020 /nandroid.c | |
parent | dbf2f25e5c9fe516dfbd02852974b98f304e1f14 (diff) | |
download | bootable_recovery-d9115b7888a4423116f819c89f0dc868f2916544.zip bootable_recovery-d9115b7888a4423116f819c89f0dc868f2916544.tar.gz bootable_recovery-d9115b7888a4423116f819c89f0dc868f2916544.tar.bz2 |
Split the tar files into 1GB pieces. Fixes backup and restore onto vfat (2gb max files). May also address busybox large fs issues.
Change-Id: I1f5a5d717ac55ae6cf053ceaa1bf0b4e0061f00a
Diffstat (limited to 'nandroid.c')
-rw-r--r-- | nandroid.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -109,9 +109,9 @@ static int mkyaffs2image_wrapper(const char* backup_path, const char* backup_fil static int tar_compress_wrapper(const char* backup_path, const char* backup_file_image, int callback) { char tmp[PATH_MAX]; if (strcmp(backup_path, "/data") == 0 && is_data_media()) - sprintf(tmp, "cd $(dirname %s) ; tar cvf %s.tar --exclude 'media' $(basename %s) ; exit $?", backup_path, backup_file_image, backup_path); + sprintf(tmp, "cd $(dirname %s) ; touch %s.tar ; tar cv --exclude 'media' $(basename %s) | split -a 1 -b 1000000000 /proc/self/fd/0 %s.tar. ; exit $?", backup_path, backup_file_image, backup_path, backup_file_image); else - sprintf(tmp, "cd $(dirname %s) ; tar cvf %s.tar $(basename %s) ; exit $?", backup_path, backup_file_image, backup_path); + sprintf(tmp, "cd $(dirname %s) ; touch %s.tar ; tar cv $(basename %s) | split -a 1 -b 1000000000 /proc/self/fd/0 %s.tar. ; exit $?", backup_path, backup_file_image, backup_path, backup_file_image); FILE *fp = __popen(tmp, "r"); if (fp == NULL) { @@ -340,7 +340,7 @@ static int unyaffs_wrapper(const char* backup_file_image, const char* backup_pat static int tar_extract_wrapper(const char* backup_file_image, const char* backup_path, int callback) { char tmp[PATH_MAX]; - sprintf(tmp, "cd $(dirname %s) ; tar xvf %s ; exit $?", backup_path, backup_file_image); + sprintf(tmp, "cd $(dirname %s) ; cat %s.* | tar xv ; exit $?", backup_path, backup_file_image); char path[PATH_MAX]; FILE *fp = __popen(tmp, "r"); |