From 11b157790234d3d2f116ce4c7ed1d3d00fb78bc3 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 23 Jun 2009 13:03:00 -0700 Subject: Add file mode to the file-backup saved state blobs This change puts the file's access mode into the saved-state blob used by the file backup helpers. The tests have been updated for the new blob content format. What this change *doesn't* do is actually backup/restore the file mode. This change is a prerequisite for that, but mode preservation in backup/restore will require adding metadata to the backup data stream itself, so will be approached a bit more carefully. (Also fixed one outright bug in the test program: ReadEntityData() had been changed to return a ssize_t union of either a byte-count or a negative number indicating error, but the test program was still assuming that nonzero == error, and was spuriously failing.) --- include/utils/BackupHelpers.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/utils/BackupHelpers.h b/include/utils/BackupHelpers.h index a21359f..759a0cc 100644 --- a/include/utils/BackupHelpers.h +++ b/include/utils/BackupHelpers.h @@ -43,6 +43,7 @@ struct SnapshotHeader { struct FileState { int modTime_sec; int modTime_nsec; + int mode; int size; int crc32; int nameLen; -- cgit v1.1