diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-26 14:19:59 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-26 14:19:59 -0700 |
| commit | d09f86ce175fad6ddbd446363f327dfa0575a1d2 (patch) | |
| tree | 1402e4c2472e7e4ec6e09e51d608d29e4f40f7d9 /libs/utils | |
| parent | 17a80081a42410f541a220ab7e6afc64fc6cc399 (diff) | |
| parent | 568bc32344dce841c8f6958f1a65ff839a1b64c0 (diff) | |
| download | frameworks_base-d09f86ce175fad6ddbd446363f327dfa0575a1d2.zip frameworks_base-d09f86ce175fad6ddbd446363f327dfa0575a1d2.tar.gz frameworks_base-d09f86ce175fad6ddbd446363f327dfa0575a1d2.tar.bz2 | |
Merge changes 5548,5549 into donut
* changes:
Better (and less) logging from backup.
Add an extra null terminator. String8::unlockBuffer is supposed to be doing this, but it's not and I can't figure out why. This makes BackupHelperDispatcher able to read the keys correctly.
Diffstat (limited to 'libs/utils')
| -rw-r--r-- | libs/utils/BackupData.cpp | 5 | ||||
| -rw-r--r-- | libs/utils/BackupHelpers.cpp | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp index 0868cff..cce754a 100644 --- a/libs/utils/BackupData.cpp +++ b/libs/utils/BackupData.cpp @@ -107,7 +107,10 @@ BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize) } else { k = key; } - LOGD("m_keyPrefix=%s key=%s k=%s", m_keyPrefix.string(), key.string(), k.string()); + if (true) { + LOGD("Writing entity: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(), key.string(), + dataSize); + } entity_header_v1 header; ssize_t keyLen; diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp index 99a4abc..4ad9b51 100644 --- a/libs/utils/BackupHelpers.cpp +++ b/libs/utils/BackupHelpers.cpp @@ -68,11 +68,15 @@ struct file_metadata_v1 { const static int CURRENT_METADATA_VERSION = 1; -#if 1 // TEST_BACKUP_HELPERS +#if 1 +#define LOGP(f, x...) +#else +#if TEST_BACKUP_HELPERS #define LOGP(f, x...) printf(f "\n", x) #else #define LOGP(x...) LOGD(x) #endif +#endif const static int ROUND_UP[4] = { 0, 3, 2, 1 }; @@ -349,7 +353,6 @@ back_up_files(int oldSnapshotFD, BackupDataWriter* dataStream, int newSnapshotFD err = stat(file, &st); if (err != 0) { - LOGW("Error stating file %s", file); r.deleted = true; } else { r.deleted = false; |
