diff options
author | Joe Onorato <joeo@android.com> | 2009-06-17 15:38:08 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-06-17 15:38:08 -0700 |
commit | 251c89c0a7502f4286f2484a77b685ddfe2b39d2 (patch) | |
tree | 9b8f8dd5d56b1ef2d295b986f54b8c55f757f3cc /cmds | |
parent | 1bd88ca88f8b89dbf09697b8eddc4703e266a654 (diff) | |
parent | 5f15d151b5101fadfe6cba1e8f4aa6367e8c603e (diff) | |
download | frameworks_base-251c89c0a7502f4286f2484a77b685ddfe2b39d2.zip frameworks_base-251c89c0a7502f4286f2484a77b685ddfe2b39d2.tar.gz frameworks_base-251c89c0a7502f4286f2484a77b685ddfe2b39d2.tar.bz2 |
am 5f15d151: checkpoint BackupDatAInput / RestoreHelper
Merge commit '5f15d151b5101fadfe6cba1e8f4aa6367e8c603e'
* commit '5f15d151b5101fadfe6cba1e8f4aa6367e8c603e':
checkpoint BackupDatAInput / RestoreHelper
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/backup/backup.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/cmds/backup/backup.cpp b/cmds/backup/backup.cpp index 22dd486..d4e669b 100644 --- a/cmds/backup/backup.cpp +++ b/cmds/backup/backup.cpp @@ -64,22 +64,14 @@ perform_list(const char* filename) } BackupDataReader reader(fd); + bool done; int type; - while (reader.ReadNextHeader(&type) == 0) { + while (reader.ReadNextHeader(&done, &type) == 0) { + if (done) { + break; + } switch (type) { - case BACKUP_HEADER_APP_V1: - { - String8 packageName; - int cookie; - err = reader.ReadAppHeader(&packageName, &cookie); - if (err == 0) { - printf("App header: %s 0x%08x (%d)\n", packageName.string(), cookie, cookie); - } else { - printf("Error reading app header\n"); - } - break; - } case BACKUP_HEADER_ENTITY_V1: { String8 key; @@ -92,17 +84,6 @@ perform_list(const char* filename) } break; } - case BACKUP_FOOTER_APP_V1: - { - int cookie; - err = reader.ReadAppFooter(&cookie); - if (err == 0) { - printf(" App footer: 0x%08x (%d)\n", cookie, cookie); - } else { - printf(" Error reading entity header\n"); - } - break; - } default: { printf("Unknown chunk type: 0x%08x\n", type); |