diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-07-18 21:47:54 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-07-19 00:04:35 +0700 |
commit | 03ea8a4f7dcafa6bc9ed173e9566c09ee028993f (patch) | |
tree | 2a62837883422c091a8bd76b720f2ef482b1edb6 /nandroid.c | |
parent | b54fd836784bbb3d3778036c358ae7f5f76cf8ed (diff) | |
download | bootable_recovery-03ea8a4f7dcafa6bc9ed173e9566c09ee028993f.zip bootable_recovery-03ea8a4f7dcafa6bc9ed173e9566c09ee028993f.tar.gz bootable_recovery-03ea8a4f7dcafa6bc9ed173e9566c09ee028993f.tar.bz2 |
recovery: fix yaffs2 backup/restore
we need to be in the directory we want to backup, not the parent
directory
Patchset 2: fix filename of yaffs2 image
Change-Id: Ibf9576bc93d5b61c5f8608212bf68de05d5eb4a4
Diffstat (limited to 'nandroid.c')
-rw-r--r-- | nandroid.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -103,7 +103,7 @@ typedef int (*nandroid_backup_handler)(const char* backup_path, const char* back static int mkyaffs2image_wrapper(const char* backup_path, const char* backup_file_image, int callback) { char tmp[PATH_MAX]; - sprintf(tmp, "cd $(dirname %s) ; mkyaffs2image . %s ; exit $?", backup_path, backup_file_image); + sprintf(tmp, "cd %s ; mkyaffs2image . %s.img ; exit $?", backup_path, backup_file_image); FILE *fp = __popen(tmp, "r"); if (fp == NULL) { @@ -386,7 +386,7 @@ typedef int (*nandroid_restore_handler)(const char* backup_file_image, const cha static int unyaffs_wrapper(const char* backup_file_image, const char* backup_path, int callback) { char tmp[PATH_MAX]; - sprintf(tmp, "cd $(dirname %s) ; unyaffs %s ; exit $?", backup_path, backup_file_image); + sprintf(tmp, "cd %s ; unyaffs %s ; exit $?", backup_path, backup_file_image); FILE *fp = __popen(tmp, "r"); if (fp == NULL) { ui_print("Unable to execute unyaffs.\n"); |